File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ fn gen_manpage<T: Args>(
6666 args : impl Iterator < Item = OsString > ,
6767 util_map : & UtilityMap < T > ,
6868) -> ! {
69+ uucore:: set_utility_is_second_arg ( ) ;
6970 let all_utilities = validation:: get_all_utilities ( util_map) ;
7071
7172 let matches = Command :: new ( "manpage" )
Original file line number Diff line number Diff line change @@ -34,8 +34,9 @@ fn test_manpage_generation() {
3434 ) ;
3535
3636 let output_str = String :: from_utf8_lossy ( & output. stdout ) ;
37- assert ! ( output_str. contains( "\n .TH" ) , "{output_str}" ) ;
37+ assert ! ( output_str. contains( "\n .TH ls " ) , "{output_str}" ) ;
3838 assert ! ( output_str. contains( '1' ) , "{output_str}" ) ;
39+ assert ! ( output_str. contains( "\n .SH NAME\n ls" ) , "{output_str}" ) ;
3940}
4041
4142#[ test]
@@ -57,8 +58,9 @@ fn test_manpage_coreutils() {
5758 ) ;
5859
5960 let output_str = String :: from_utf8_lossy ( & output. stdout ) ;
60- assert ! ( output_str. contains( "\n .TH" ) , "{output_str}" ) ;
61+ assert ! ( output_str. contains( "\n .TH coreutils " ) , "{output_str}" ) ;
6162 assert ! ( output_str. contains( "coreutils" ) , "{output_str}" ) ;
63+ assert ! ( output_str. contains( "\n .SH NAME\n coreutils" ) , "{output_str}" ) ;
6264}
6365
6466#[ test]
You can’t perform that action at this time.
0 commit comments