Lines Matching refs:TestOption
23 pub options: Vec<TestOption<'a>>,
28 pub enum TestOption<'a> { enum
45 .map(TestOption::new) in new()
61 impl<'a> TestOption<'a> { implementation
66 None => TestOption::Flag(s), in new()
67 Some(p) => TestOption::Value(&s[0..p], &s[p + 1..]), in new()
72 impl<'a> Display for TestOption<'a> { implementation
75 TestOption::Flag(s) => write!(f, "{s}"), in fmt()
76 TestOption::Value(s, v) => write!(f, "{s}={v}"), in fmt()
87 assert_eq!(TestOption::new(""), TestOption::Flag("")); in parse_option()
88 assert_eq!(TestOption::new("foo"), TestOption::Flag("foo")); in parse_option()
89 assert_eq!(TestOption::new("foo=bar"), TestOption::Value("foo", "bar")); in parse_option()