File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -484,7 +484,7 @@ fn wipe_file(
484484 if verbose {
485485 let pass_name = pass_name ( & pass_type) ;
486486 show_error ! (
487- "{}: pass {:2 }/{total_passes} ({pass_name})..." ,
487+ "{}: pass {}/{total_passes} ({pass_name})..." ,
488488 path. maybe_quote( ) ,
489489 i + 1 ,
490490 ) ;
Original file line number Diff line number Diff line change @@ -208,3 +208,25 @@ fn test_shred_fail_no_perm() {
208208 . fails ( )
209209 . stderr_contains ( "Couldn't rename to" ) ;
210210}
211+
212+ #[ test]
213+ fn test_shred_verbose_no_padding_1 ( ) {
214+ let ( at, mut ucmd) = at_and_ucmd ! ( ) ;
215+ let file = "foo" ;
216+ at. write ( file, "non-empty" ) ;
217+ ucmd. arg ( "-vn1" )
218+ . arg ( file)
219+ . succeeds ( )
220+ . stderr_only ( "shred: foo: pass 1/1 (random)...\n " ) ;
221+ }
222+
223+ #[ test]
224+ fn test_shred_verbose_no_padding_10 ( ) {
225+ let ( at, mut ucmd) = at_and_ucmd ! ( ) ;
226+ let file = "foo" ;
227+ at. write ( file, "non-empty" ) ;
228+ ucmd. arg ( "-vn10" )
229+ . arg ( file)
230+ . succeeds ( )
231+ . stderr_contains ( "shred: foo: pass 1/10 (random)...\n " ) ;
232+ }
You can’t perform that action at this time.
0 commit comments