Lines Matching full:opt
14 struct Opt { in unique_flag() struct
20 Opt { alice: false }, in unique_flag()
21 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in unique_flag()
24 Opt { alice: true }, in unique_flag()
25 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a"])) in unique_flag()
28 Opt { alice: true }, in unique_flag()
29 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "--alice"])) in unique_flag()
31 assert!(Opt::clap().get_matches_from_safe(&["test", "-i"]).is_err()); in unique_flag()
32 assert!(Opt::clap() in unique_flag()
35 assert!(Opt::clap() in unique_flag()
38 assert!(Opt::clap() in unique_flag()
46 struct Opt { in multiple_flag() struct
54 Opt { alice: 0, bob: 0 }, in multiple_flag()
55 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in multiple_flag()
58 Opt { alice: 1, bob: 0 }, in multiple_flag()
59 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a"])) in multiple_flag()
62 Opt { alice: 2, bob: 0 }, in multiple_flag()
63 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "-a"])) in multiple_flag()
66 Opt { alice: 2, bob: 2 }, in multiple_flag()
67 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a", "--alice", "-bb"])) in multiple_flag()
70 Opt { alice: 3, bob: 1 }, in multiple_flag()
71 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-aaa", "--bob"])) in multiple_flag()
73 assert!(Opt::clap().get_matches_from_safe(&["test", "-i"]).is_err()); in multiple_flag()
74 assert!(Opt::clap() in multiple_flag()
86 struct Opt { in non_bool_flags() struct
93 let falsey = Opt::from_clap(&Opt::clap().get_matches_from(&["test"])); in non_bool_flags()
97 let alice = Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a"])); in non_bool_flags()
101 let bob = Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-b"])); in non_bool_flags()
105 let both = Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-b", "-a"])); in non_bool_flags()
113 struct Opt { in combined_flags() struct
121 Opt { in combined_flags()
125 Opt::from_clap(&Opt::clap().get_matches_from(&["test"])) in combined_flags()
128 Opt { in combined_flags()
132 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a"])) in combined_flags()
135 Opt { in combined_flags()
139 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-a"])) in combined_flags()
142 Opt { in combined_flags()
146 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-b"])) in combined_flags()
149 Opt { in combined_flags()
153 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "--alice", "--bob"])) in combined_flags()
156 Opt { in combined_flags()
160 Opt::from_clap(&Opt::clap().get_matches_from(&["test", "-bb", "-a", "-bb"])) in combined_flags()