mirror of
https://github.com/uutils/uutils-args.git
synced 2026-06-10 16:13:08 -07:00
Fix tests for new initial macro
This commit is contained in:
+1
-1
@@ -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,
|
||||
|
||||
@@ -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
@@ -34,7 +34,7 @@ fn env_var_string() {
|
||||
|
||||
#[derive(Initial)]
|
||||
struct Settings {
|
||||
#[initial("FOO")]
|
||||
#[initial(env="FOO")]
|
||||
foo: String,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user