@@ -30,11 +30,15 @@ use std::time::Duration;
30
30
use tempfile:: tempfile;
31
31
32
32
macro_rules! inf {
33
- ( $fname: expr) => { { & format!( "if={}" , $fname) } } ;
33
+ ( $fname: expr) => {
34
+ format!( "if={}" , $fname)
35
+ } ;
34
36
}
35
37
36
38
macro_rules! of {
37
- ( $fname: expr) => { { & format!( "of={}" , $fname) } } ;
39
+ ( $fname: expr) => {
40
+ format!( "of={}" , $fname)
41
+ } ;
38
42
}
39
43
40
44
macro_rules! fixture_path {
@@ -290,7 +294,7 @@ fn test_noatime_does_not_update_infile_atime() {
290
294
assert_fixture_exists ! ( & fname) ;
291
295
292
296
let ( fix, mut ucmd) = at_and_ucmd ! ( ) ;
293
- ucmd. args ( & [ "status=none" , "iflag=noatime" , inf ! ( fname) ] ) ;
297
+ ucmd. args ( & [ "status=none" , "iflag=noatime" , & inf ! ( fname) ] ) ;
294
298
295
299
let pre_atime = fix. metadata ( fname) . accessed ( ) . unwrap ( ) ;
296
300
@@ -310,7 +314,7 @@ fn test_noatime_does_not_update_ofile_atime() {
310
314
assert_fixture_exists ! ( & fname) ;
311
315
312
316
let ( fix, mut ucmd) = at_and_ucmd ! ( ) ;
313
- ucmd. args ( & [ "status=none" , "oflag=noatime" , of ! ( fname) ] ) ;
317
+ ucmd. args ( & [ "status=none" , "oflag=noatime" , & of ! ( fname) ] ) ;
314
318
315
319
let pre_atime = fix. metadata ( fname) . accessed ( ) . unwrap ( ) ;
316
320
@@ -327,7 +331,7 @@ fn test_nocreat_causes_failure_when_outfile_not_present() {
327
331
assert_fixture_not_exists ! ( & fname) ;
328
332
329
333
let ( fix, mut ucmd) = at_and_ucmd ! ( ) ;
330
- ucmd. args ( & [ "conv=nocreat" , of ! ( & fname) ] )
334
+ ucmd. args ( & [ "conv=nocreat" , & of ! ( & fname) ] )
331
335
. pipe_in ( "" )
332
336
. fails ( )
333
337
. stderr_only (
@@ -347,7 +351,7 @@ fn test_notrunc_does_not_truncate() {
347
351
}
348
352
349
353
let ( fix, mut ucmd) = at_and_ucmd ! ( ) ;
350
- ucmd. args ( & [ "status=none" , "conv=notrunc" , of ! ( & fname) , "if=null.txt" ] )
354
+ ucmd. args ( & [ "status=none" , "conv=notrunc" , & of ! ( & fname) , "if=null.txt" ] )
351
355
. succeeds ( )
352
356
. no_output ( ) ;
353
357
@@ -365,7 +369,7 @@ fn test_existing_file_truncated() {
365
369
}
366
370
367
371
let ( fix, mut ucmd) = at_and_ucmd ! ( ) ;
368
- ucmd. args ( & [ "status=none" , "if=null.txt" , of ! ( fname) ] )
372
+ ucmd. args ( & [ "status=none" , "if=null.txt" , & of ! ( fname) ] )
369
373
. succeeds ( )
370
374
. no_output ( ) ;
371
375
@@ -409,7 +413,7 @@ fn test_fullblock() {
409
413
let ucmd = new_ucmd ! ( )
410
414
. args ( & [
411
415
"if=/dev/urandom" ,
412
- of ! ( & tmp_fn) ,
416
+ & of ! ( & tmp_fn) ,
413
417
"bs=128M" ,
414
418
// Note: In order for this test to actually test iflag=fullblock, the bs=VALUE
415
419
// must be big enough to 'overwhelm' the urandom store of bytes.
@@ -492,7 +496,7 @@ fn test_zeros_to_file() {
492
496
assert_fixture_exists ! ( test_fn) ;
493
497
494
498
let ( fix, mut ucmd) = at_and_ucmd ! ( ) ;
495
- ucmd. args ( & [ "status=none" , inf ! ( test_fn) , of ! ( tmp_fn) ] )
499
+ ucmd. args ( & [ "status=none" , & inf ! ( test_fn) , & of ! ( tmp_fn) ] )
496
500
. succeeds ( )
497
501
. no_output ( ) ;
498
502
@@ -512,8 +516,8 @@ fn test_to_file_with_ibs_obs() {
512
516
let ( fix, mut ucmd) = at_and_ucmd ! ( ) ;
513
517
ucmd. args ( & [
514
518
"status=none" ,
515
- inf ! ( test_fn) ,
516
- of ! ( tmp_fn) ,
519
+ & inf ! ( test_fn) ,
520
+ & of ! ( tmp_fn) ,
517
521
"ibs=222" ,
518
522
"obs=111" ,
519
523
] )
@@ -533,7 +537,7 @@ fn test_ascii_521k_to_file() {
533
537
let tmp_fn = format ! ( "TESTFILE-{}.tmp" , & tname) ;
534
538
535
539
let ( fix, mut ucmd) = at_and_ucmd ! ( ) ;
536
- ucmd. args ( & [ "status=none" , of ! ( tmp_fn) ] )
540
+ ucmd. args ( & [ "status=none" , & of ! ( tmp_fn) ] )
537
541
. pipe_in ( input. clone ( ) )
538
542
. succeeds ( )
539
543
. no_output ( ) ;
@@ -563,7 +567,7 @@ fn test_ascii_5_gibi_to_file() {
563
567
"count=5G" ,
564
568
"iflag=count_bytes" ,
565
569
"if=/dev/zero" ,
566
- of ! ( tmp_fn) ,
570
+ & of ! ( tmp_fn) ,
567
571
] )
568
572
. succeeds ( )
569
573
. no_output ( ) ;
@@ -577,7 +581,7 @@ fn test_self_transfer() {
577
581
assert_fixture_exists ! ( fname) ;
578
582
579
583
let ( fix, mut ucmd) = at_and_ucmd ! ( ) ;
580
- ucmd. args ( & [ "status=none" , "conv=notrunc" , inf ! ( fname) , of ! ( fname) ] ) ;
584
+ ucmd. args ( & [ "status=none" , "conv=notrunc" , & inf ! ( fname) , & of ! ( fname) ] ) ;
581
585
582
586
assert ! ( fix. file_exists( fname) ) ;
583
587
assert_eq ! ( 256 * 1024 , fix. metadata( fname) . len( ) ) ;
@@ -596,7 +600,7 @@ fn test_unicode_filenames() {
596
600
assert_fixture_exists ! ( test_fn) ;
597
601
598
602
let ( fix, mut ucmd) = at_and_ucmd ! ( ) ;
599
- ucmd. args ( & [ "status=none" , inf ! ( test_fn) , of ! ( tmp_fn) ] )
603
+ ucmd. args ( & [ "status=none" , & inf ! ( test_fn) , & of ! ( tmp_fn) ] )
600
604
. succeeds ( )
601
605
. no_output ( ) ;
602
606
0 commit comments