Fix tests for new initial macro

This commit is contained in:
Terts Diepraam
2023-03-08 16:06:40 +01:00
parent f08e8aa42f
commit 946728596b
3 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -66,7 +66,7 @@
//! #[derive(Initial)]
//! struct Settings {
//! // We can change the default value with the field attribute.
//! #[field(default = true)]
//! #[initial(true)]
//! caps: bool,
//! exclamation_marks: u8,
//! text: String,
+1 -5
View File
@@ -225,11 +225,7 @@ fn shorthand() {
assert_eq!(s.number, SigNum::Negative(20));
assert_eq!(s.mode, Mode::Lines);
let s = parse_head(["head", "+20", "some_file"]).unwrap();
assert_eq!(s.number, SigNum::Positive(20));
assert_eq!(s.mode, Mode::Lines);
let s = parse_head(["head", "-100cf", "some_file"]).unwrap();
let s = parse_head(["head", "-100cq", "some_file"]).unwrap();
assert_eq!(s.number, SigNum::Negative(100));
assert_eq!(s.mode, Mode::Bytes);
+1 -1
View File
@@ -34,7 +34,7 @@ fn env_var_string() {
#[derive(Initial)]
struct Settings {
#[initial("FOO")]
#[initial(env="FOO")]
foo: String,
}