File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010use clap:: CommandFactory ;
1111use parallel_disk_usage:: { args:: Args , usage_md:: render_usage_md} ;
12+ use pipe_trait:: Pipe ;
1213
1314fn normalize_help ( text : & str ) -> String {
1415 text. lines ( )
@@ -19,7 +20,10 @@ fn normalize_help(text: &str) -> String {
1920
2021#[ test]
2122fn long_help_is_up_to_date ( ) {
22- let actual = normalize_help ( & Args :: command ( ) . render_long_help ( ) . to_string ( ) ) ;
23+ let actual = Args :: command ( )
24+ . render_long_help ( )
25+ . to_string ( )
26+ . pipe_as_ref ( normalize_help) ;
2327 let expected = normalize_help ( include_str ! ( "../exports/long.help" ) ) ;
2428 assert ! (
2529 actual. trim_end( ) == expected. trim_end( ) ,
@@ -29,7 +33,10 @@ fn long_help_is_up_to_date() {
2933
3034#[ test]
3135fn short_help_is_up_to_date ( ) {
32- let actual = normalize_help ( & Args :: command ( ) . render_help ( ) . to_string ( ) ) ;
36+ let actual = Args :: command ( )
37+ . render_help ( )
38+ . to_string ( )
39+ . pipe_as_ref ( normalize_help) ;
3340 let expected = normalize_help ( include_str ! ( "../exports/short.help" ) ) ;
3441 assert ! (
3542 actual. trim_end( ) == expected. trim_end( ) ,
You can’t perform that action at this time.
0 commit comments