@@ -5,7 +5,7 @@ use std::io::{self, BufRead, BufReader};
55use std:: path:: PathBuf ;
66use std:: process:: { self , Command } ;
77use std:: { array, env, mem} ;
8- use winnow:: ascii:: { space0, space1 } ;
8+ use winnow:: ascii:: { space0, Caseless } ;
99use winnow:: combinator:: opt;
1010use winnow:: Parser ;
1111
@@ -21,13 +21,7 @@ fn not_done(input: &str) -> bool {
2121 "//" ,
2222 opt ( '/' ) ,
2323 space0,
24- 'I' ,
25- space1,
26- "AM" ,
27- space1,
28- "NOT" ,
29- space1,
30- "DONE" ,
24+ Caseless ( "I AM NOT DONE" ) ,
3125 )
3226 . parse_next ( & mut & * input)
3327 . is_ok ( )
@@ -438,15 +432,13 @@ mod test {
438432 assert ! ( not_done( "/// I AM NOT DONE" ) ) ;
439433 assert ! ( not_done( "// I AM NOT DONE" ) ) ;
440434 assert ! ( not_done( "/// I AM NOT DONE" ) ) ;
441- assert ! ( not_done( "// I AM NOT DONE" ) ) ;
442- assert ! ( not_done( "// I AM NOT DONE" ) ) ;
443- assert ! ( not_done( "// I AM NOT DONE" ) ) ;
444435 assert ! ( not_done( "// I AM NOT DONE " ) ) ;
445436 assert ! ( not_done( "// I AM NOT DONE!" ) ) ;
437+ assert ! ( not_done( "// I am not done" ) ) ;
438+ assert ! ( not_done( "// i am NOT done" ) ) ;
446439
447440 assert ! ( !not_done( "I AM NOT DONE" ) ) ;
448441 assert ! ( !not_done( "// NOT DONE" ) ) ;
449442 assert ! ( !not_done( "DONE" ) ) ;
450- assert ! ( !not_done( "// i am not done" ) ) ;
451443 }
452444}
0 commit comments