File tree Expand file tree Collapse file tree
src/uucore/src/lib/features/checksum Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -951,9 +951,7 @@ fn process_checksum_file(
951951 // not a single line correctly formatted found
952952 // return an error
953953 if res. total_properly_formatted ( ) == 0 {
954- if opts. verbose . over_status ( ) {
955- log_no_properly_formatted ( filename_display ( ) ) ;
956- }
954+ log_no_properly_formatted ( filename_display ( ) ) ;
957955 return Err ( FileCheckError :: Failed ) ;
958956 }
959957
Original file line number Diff line number Diff line change @@ -158,6 +158,23 @@ fn test_check_b2sum_length_option_8() {
158158 . stdout_only ( "testf: OK\n " ) ;
159159}
160160
161+ #[ test]
162+ fn test_check_b2sum_status_reports_no_properly_formatted_lines ( ) {
163+ let invalid_checksum = concat ! (
164+ "bedfbb90d858c2d67b7ee8f7523be3d3b54004ef9e4f02f2" ,
165+ "ad79a1d05bfdfe49b81e3c92ebf99b504102b6bf003fa342" ,
166+ "587f5b3124c205f55204e8c4b4ce7d7c" ,
167+ ) ;
168+
169+ new_ucmd ! ( )
170+ . arg ( "-c" )
171+ . arg ( "--status" )
172+ . pipe_in ( invalid_checksum)
173+ . fails ( )
174+ . no_stdout ( )
175+ . stderr_contains ( "b2sum: 'standard input': no properly formatted checksum lines found" ) ;
176+ }
177+
161178#[ test]
162179fn test_invalid_b2sum_length_option_not_multiple_of_8 ( ) {
163180 let scene = TestScenario :: new ( util_name ! ( ) ) ;
You can’t perform that action at this time.
0 commit comments