diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-10-28 13:02:31 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-11-04 02:03:41 +0000 |
commit | ab40a941a07d80326aaa051e3c94c88b800cbd7d (patch) | |
tree | 382e656f126d0e63ca1158f8f43630e1dd10d18b /tests/du | |
parent | 00eb7af8ea30ccbefeb17213cd644b8f0ade1ef8 (diff) | |
download | coreutils-ab40a941a07d80326aaa051e3c94c88b800cbd7d.tar.xz |
all: replace most uses of quotearg_colon() with quote()
Related to commit v8.24-61-g6796698 this provides
more consistent quoting, as quotearg_colon() defaults
to "literal" quoting by default, while quote()
provides appropriate quoting for diagnostics by default.
* gl/modules/randread: Depend on quote module rather than quotearg.
* gl/lib/randread.c: Used quote() not quotearg_colon().
* src/: Likewise.
* src/shred.c: Likewise. Also avoid unnecessary quoting
introducing overhead when wiping names.
* cfg.mk: Relax the matching expression to allow
"qname" variables as used in shred.c to satisfy the check.
* tests/: Adjust accordingly.
Diffstat (limited to 'tests/du')
-rwxr-xr-x | tests/du/files0-from-dir.sh | 4 | ||||
-rwxr-xr-x | tests/du/files0-from.pl | 8 | ||||
-rwxr-xr-x | tests/du/move-dir-while-traversing.sh | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/du/files0-from-dir.sh b/tests/du/files0-from-dir.sh index 2f55c4ed6..4d7e90cf5 100755 --- a/tests/du/files0-from-dir.sh +++ b/tests/du/files0-from-dir.sh @@ -29,10 +29,10 @@ cat dir > /dev/null && skip_ "cat dir/ succeeds" for prog in du wc; do $prog --files0-from=dir > /dev/null 2>err && fail=1 - printf "$prog: dir:\n" > exp || fail=1 + printf "$prog: 'dir':\n" > exp || fail=1 # The diagnostic string is usually "Is a directory" (ENOTDIR), # but accept a different string or errno value. - sed 's/dir:.*/dir:/' err > k; mv k err + sed "s/'dir':.*/'dir':/" err > k; mv k err compare exp err || fail=1 done diff --git a/tests/du/files0-from.pl b/tests/du/files0-from.pl index 3854059f0..f0177a2d0 100755 --- a/tests/du/files0-from.pl +++ b/tests/du/files0-from.pl @@ -53,12 +53,12 @@ my @Tests = # one NUL ['nul-1', '--files0-from=-', '<', {IN=>"\0"}, {EXIT=>1}, - {ERR => "$prog: -:1: invalid zero-length file name\n"}], + {ERR => "$prog: '-':1: invalid zero-length file name\n"}], # two NULs ['nul-2', '--files0-from=-', '<', {IN=>"\0\0"}, {EXIT=>1}, - {ERR => "$prog: -:1: invalid zero-length file name\n" - . "$prog: -:2: invalid zero-length file name\n"}], + {ERR => "$prog: '-':1: invalid zero-length file name\n" + . "$prog: '-':2: invalid zero-length file name\n"}], # one file name, no NUL ['1', '--files0-from=-', '<', @@ -84,7 +84,7 @@ my @Tests = ['zero-len', '--files0-from=-', '<', {IN=>{f=>"\0g\0"}}, {AUX=>{g=>''}}, {OUT=>"0\tg\n"}, {OUT_SUBST=>'s/^\d+/0/'}, - {ERR => "$prog: -:1: invalid zero-length file name\n"}, {EXIT=>1} ], + {ERR => "$prog: '-':1: invalid zero-length file name\n"}, {EXIT=>1} ], ); my $save_temps = $ENV{DEBUG}; diff --git a/tests/du/move-dir-while-traversing.sh b/tests/du/move-dir-while-traversing.sh index 67bb34580..33db58e44 100755 --- a/tests/du/move-dir-while-traversing.sh +++ b/tests/du/move-dir-while-traversing.sh @@ -92,7 +92,7 @@ du -a $t d2 2> err test $? = 1 || fail=1 # check for the new diagnostic -printf "du: fts_read failed: $t/3/a/b: No such file or directory\n" > exp \ +printf "du: fts_read failed: '$t/3/a/b': No such file or directory\n" > exp \ || fail=1 compare exp err || fail=1 |