diff options
author | Jim Meyering <meyering@redhat.com> | 2012-01-07 17:47:58 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-01-09 21:50:08 +0100 |
commit | dd0e4c5621ca2fa9255aef4eee0e7cf41cd335d2 (patch) | |
tree | 5194ff517669cfb08a3ba329658b45870ab063bd /tests/rm | |
parent | 50610144b02763f5dd5f6198ceceb88c27c393aa (diff) | |
download | coreutils-dd0e4c5621ca2fa9255aef4eee0e7cf41cd335d2.tar.xz |
tests: change `...' to '...' on lines not matching /[=\$]/
Exempt lines with '$' or '=', since those are prone to improper
conversion. Run this:
git grep -l "\`[^']*'" tests \
|xargs perl -pi -e '/[=\$]/ and next;s/\`([^'\''"]*?'\'')/'\''$1/g'
Diffstat (limited to 'tests/rm')
-rwxr-xr-x | tests/rm/cycle | 4 | ||||
-rwxr-xr-x | tests/rm/deep-1 | 2 | ||||
-rwxr-xr-x | tests/rm/dir-no-w | 6 | ||||
-rwxr-xr-x | tests/rm/dir-nonrecur | 4 | ||||
-rwxr-xr-x | tests/rm/empty-name | 2 | ||||
-rwxr-xr-x | tests/rm/fail-2eperm | 6 | ||||
-rwxr-xr-x | tests/rm/fail-eacces | 4 | ||||
-rwxr-xr-x | tests/rm/i-no-r | 2 | ||||
-rwxr-xr-x | tests/rm/inaccessible | 2 | ||||
-rwxr-xr-x | tests/rm/interactive-always | 4 | ||||
-rwxr-xr-x | tests/rm/isatty | 8 | ||||
-rwxr-xr-x | tests/rm/no-give-up | 2 | ||||
-rwxr-xr-x | tests/rm/one-file-system | 2 | ||||
-rwxr-xr-x | tests/rm/r-1 | 6 | ||||
-rwxr-xr-x | tests/rm/r-2 | 8 | ||||
-rwxr-xr-x | tests/rm/readdir-bug | 2 | ||||
-rwxr-xr-x | tests/rm/rm1 | 4 | ||||
-rwxr-xr-x | tests/rm/rm2 | 8 | ||||
-rwxr-xr-x | tests/rm/rm3 | 4 | ||||
-rwxr-xr-x | tests/rm/rm4 | 2 | ||||
-rwxr-xr-x | tests/rm/rm5 | 10 | ||||
-rwxr-xr-x | tests/rm/sunos-1 | 2 | ||||
-rwxr-xr-x | tests/rm/unread2 | 2 | ||||
-rwxr-xr-x | tests/rm/v-slash | 4 |
24 files changed, 50 insertions, 50 deletions
diff --git a/tests/rm/cycle b/tests/rm/cycle index 48e77c23e..5f1fb3a01 100755 --- a/tests/rm/cycle +++ b/tests/rm/cycle @@ -27,8 +27,8 @@ chmod u-w a/b rm -rf a a 2>&1 | sed 's/:[^:]*$//' > out || fail=1 cat <<\EOF > exp -rm: cannot remove `a/b/file' -rm: cannot remove `a/b/file' +rm: cannot remove 'a/b/file' +rm: cannot remove 'a/b/file' EOF compare exp out || fail=1 diff --git a/tests/rm/deep-1 b/tests/rm/deep-1 index fbda20b35..c3632dd62 100755 --- a/tests/rm/deep-1 +++ b/tests/rm/deep-1 @@ -34,7 +34,7 @@ k200=$k20$k20$k20$k20$k20$k20$k20$k20$k20$k20 # Be careful not to exceed max file name length (usu 512?). # Doing so wouldn't affect GNU mkdir or GNU rm, but any tool that -# operates on the full pathname (like `test') would choke. +# operates on the full pathname (like 'test') would choke. k_deep=$k200$k200 t=t diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w index 74dfa0c13..0342956ba 100755 --- a/tests/rm/dir-no-w +++ b/tests/rm/dir-no-w @@ -26,13 +26,13 @@ mkdir --mode=0500 unwritable-dir || framework_failure_ # For rm from coreutils-5.0.1, this would prompt. rm ---presume-input-tty unwritable-dir < /dev/null > out-t 2>&1 && fail=1 cat <<\EOF > exp || fail=1 -rm: cannot remove `unwritable-dir': Is a directory +rm: cannot remove 'unwritable-dir': Is a directory EOF # When run by a non-privileged user we get this: -# rm: cannot remove directory `unwritable-dir': Is a directory +# rm: cannot remove directory 'unwritable-dir': Is a directory # When run by root we get this: -# rm: cannot remove `unwritable-dir': Is a directory +# rm: cannot remove 'unwritable-dir': Is a directory # Normalize the message. sed 's/remove directory/remove/' out-t > out rm -f out-t diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur index edd5d372a..8876e9458 100755 --- a/tests/rm/dir-nonrecur +++ b/tests/rm/dir-nonrecur @@ -1,5 +1,5 @@ #!/bin/sh -# Ensure that `rm dir' (i.e., without --recursive) gives a reasonable +# Ensure that 'rm dir' (i.e., without --recursive) gives a reasonable # diagnostic when failing. # Copyright (C) 2005-2012 Free Software Foundation, Inc. @@ -25,7 +25,7 @@ mkdir d || framework_failure_ rm d 2> out && fail=1 cat <<\EOF > exp || fail=1 -rm: cannot remove `d': Is a directory +rm: cannot remove 'd': Is a directory EOF # Before coreutils-5.93 this test would fail on Solaris 9 and newer. diff --git a/tests/rm/empty-name b/tests/rm/empty-name index 58fb8505d..192a60b4b 100755 --- a/tests/rm/empty-name +++ b/tests/rm/empty-name @@ -18,7 +18,7 @@ # On SunOS 4.1.3, running rm -r '' in a nonempty directory may # actually remove files with names of entries in the current directory -# but relative to `/' rather than relative to the current directory. +# but relative to '/' rather than relative to the current directory. use strict; diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm index 511464e2b..56c27c438 100755 --- a/tests/rm/fail-2eperm +++ b/tests/rm/fail-2eperm @@ -41,13 +41,13 @@ case $rm_version in esac setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm -rf a 2> out-t && fail=1 -# On some systems, we get `Not owner'. Convert it. -# On other systems (HPUX), we get `Permission denied'. Convert it, too. +# On some systems, we get 'Not owner'. Convert it. +# On other systems (HPUX), we get 'Permission denied'. Convert it, too. onp='Operation not permitted' sed "s/Not owner/$onp/;s/Permission denied/$onp/" out-t > out cat <<\EOF > exp -rm: cannot remove `a/b': Operation not permitted +rm: cannot remove 'a/b': Operation not permitted EOF compare exp out || fail=1 diff --git a/tests/rm/fail-eacces b/tests/rm/fail-eacces index 1a2d06bb7..947dfac36 100755 --- a/tests/rm/fail-eacces +++ b/tests/rm/fail-eacces @@ -40,14 +40,14 @@ test $ok = 1 || framework_failure_ rm -rf d/f 2> out && fail=1 cat <<\EOF > exp -rm: cannot remove `d/f': Permission denied +rm: cannot remove 'd/f': Permission denied EOF compare exp out || fail=1 # This used to fail with ELOOP. rm -rf e 2> out && fail=1 cat <<\EOF > exp -rm: cannot remove `e/slink': Permission denied +rm: cannot remove 'e/slink': Permission denied EOF compare exp out || fail=1 diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r index d7d3c0186..8a3e76958 100755 --- a/tests/rm/i-no-r +++ b/tests/rm/i-no-r @@ -1,5 +1,5 @@ #!/bin/sh -# Since the rewrite for fileutils-4.1.9, `rm -i DIR' would mistakenly +# Since the rewrite for fileutils-4.1.9, 'rm -i DIR' would mistakenly # recurse into directory DIR. rm -i (without -r) must fail in that case. # Fixed in coreutils-4.5.2. diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible index 2bcdc11d9..517a384f9 100755 --- a/tests/rm/inaccessible +++ b/tests/rm/inaccessible @@ -35,7 +35,7 @@ test -d "$p/abs1" && fail=1 test -d "$p/abs2" && fail=1 cat <<\EOF > exp || fail=1 -rm: cannot remove `rel': Permission denied +rm: cannot remove 'rel': Permission denied EOF # AIX 4.3.3 fails with a different diagnostic. diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always index 99aedbbf7..41c8f4131 100755 --- a/tests/rm/interactive-always +++ b/tests/rm/interactive-always @@ -70,13 +70,13 @@ cat <<\EOF > expout || fail=1 EOF sed 's/@remove_empty/rm: remove regular empty file/g' <<\EOF > experr || fail=1 no WHEN -@remove_empty `file1-1'? @remove_empty `file1-2'? . +@remove_empty 'file1-1'? @remove_empty 'file1-2'? . WHEN=never . WHEN=once rm: remove all arguments recursively? . WHEN=always -@remove_empty `file4-1'? @remove_empty `file4-2'? . +@remove_empty 'file4-1'? @remove_empty 'file4-2'? . -f overrides --interactive . --interactive overrides -f diff --git a/tests/rm/isatty b/tests/rm/isatty index 3b7d1b39d..b1e558b66 100755 --- a/tests/rm/isatty +++ b/tests/rm/isatty @@ -1,5 +1,5 @@ #!/bin/sh -# Make sure `chown 0 f; rm f' prompts before removing f. +# Make sure 'chown 0 f; rm f' prompts before removing f. # Copyright (C) 2001-2012 Free Software Foundation, Inc. @@ -39,14 +39,14 @@ test -f f || fail=1 kill $pid > /dev/null 2>&1 -# Note the trailing `x' -- so I don't have to have a trailing +# Note the trailing 'x' -- so I don't have to have a trailing # blank in this file :-) cat > exp <<\EOF -rm: remove write-protected regular empty file `f'? x +rm: remove write-protected regular empty file 'f'? x EOF #` -# Append an `x' and a newline. +# Append an 'x' and a newline. echo x >> out compare exp out || fail=1 diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up index d0ff23748..690c5b617 100755 --- a/tests/rm/no-give-up +++ b/tests/rm/no-give-up @@ -1,5 +1,5 @@ #!/bin/sh -# With rm from coreutils-5.2.1 and earlier, `rm -r' would mistakenly +# With rm from coreutils-5.2.1 and earlier, 'rm -r' would mistakenly # give up too early under some conditions. # Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system index e9a5cf0c6..675c3fd0a 100755 --- a/tests/rm/one-file-system +++ b/tests/rm/one-file-system @@ -36,7 +36,7 @@ mount --bind $t a/b \ || skip_ "This test requires mount with a working --bind option." cat <<\EOF > exp || framework_failure_ -rm: skipping `a/b', since it's on a different device +rm: skipping 'a/b', since it's on a different device EOF diff --git a/tests/rm/r-1 b/tests/rm/r-1 index 7d26280b6..97d0959c1 100755 --- a/tests/rm/r-1 +++ b/tests/rm/r-1 @@ -26,9 +26,9 @@ mkdir a a/a || framework_failure_ > b || framework_failure_ cat <<\EOF > $test.E || framework_failure_ -removed directory: `a/a' -removed directory: `a' -removed `b' +removed directory: 'a/a' +removed directory: 'a' +removed 'b' EOF rm --verbose -r a b > $test.O || fail=1 diff --git a/tests/rm/r-2 b/tests/rm/r-2 index 55c4807a0..0a588316b 100755 --- a/tests/rm/r-2 +++ b/tests/rm/r-2 @@ -26,10 +26,10 @@ mkdir t t/a t/a/b || framework_failure_ # FIXME: if this fails, it's a framework failure cat <<\EOF | sort > t/E || framework_failure_ -removed directory: `t/a' -removed directory: `t/a/b' -removed `t/a/b/g' -removed `t/a/f' +removed directory: 't/a' +removed directory: 't/a/b' +removed 't/a/b/g' +removed 't/a/f' EOF # Note that both the expected output (above) and the actual output lines diff --git a/tests/rm/readdir-bug b/tests/rm/readdir-bug index 591e91306..3835049ee 100755 --- a/tests/rm/readdir-bug +++ b/tests/rm/readdir-bug @@ -33,7 +33,7 @@ cd .. || framework_failure_ # On a buggy system, this would fail with the diagnostic, -# "cannot remove directory `b': Directory not empty" +# "cannot remove directory 'b': Directory not empty" rm -rf b || fail=1 test -d b && fail=1 diff --git a/tests/rm/rm1 b/tests/rm/rm1 index cde576adf..672f0f0a0 100755 --- a/tests/rm/rm1 +++ b/tests/rm/rm1 @@ -27,13 +27,13 @@ chmod u-w b/a || framework_failure_ # This should fail. rm -rf b > out 2>&1 && fail=1 cat <<\EOF > exp -rm: cannot remove directory `b/a/p': Permission denied +rm: cannot remove directory 'b/a/p': Permission denied EOF # On some systems, rm doesn't have enough information to # say it's a directory. cat <<\EOF > exp2 -rm: cannot remove `b/a/p': Permission denied +rm: cannot remove 'b/a/p': Permission denied EOF cmp out exp > /dev/null 2>&1 || { diff --git a/tests/rm/rm2 b/tests/rm/rm2 index b1477a3d4..7bbdfeaba 100755 --- a/tests/rm/rm2 +++ b/tests/rm/rm2 @@ -31,13 +31,13 @@ chmod u-x a/1 b || framework_failure_ # Both of these should fail. rm -rf a b > out 2>&1 && fail=1 cat <<\EOF > exp -rm: cannot remove `a/1': Permission denied -rm: cannot remove `b': Permission denied +rm: cannot remove 'a/1': Permission denied +rm: cannot remove 'b': Permission denied EOF cat <<\EOF > exp-solaris -rm: cannot remove `a/1/2': Permission denied -rm: cannot remove `b/3': Permission denied +rm: cannot remove 'a/1/2': Permission denied +rm: cannot remove 'b/3': Permission denied EOF cmp out exp > /dev/null 2>&1 \ diff --git a/tests/rm/rm3 b/tests/rm/rm3 index 17118d1fe..bf43f5e2d 100755 --- a/tests/rm/rm3 +++ b/tests/rm/rm3 @@ -46,8 +46,8 @@ EOF # Both of these should fail. rm -ir z < in > out 2>&1 || fail=1 -# Given input like `rm: ...? rm: ...? ' (no trailing newline), -# the `head...' part of the pipeline below removes the trailing space, so +# Given input like 'rm: ...? rm: ...? ' (no trailing newline), +# the 'head...' part of the pipeline below removes the trailing space, so # that sed doesn't have to deal with a line lacking a terminating newline. # This avoids a bug whereby some vendor-provided (Tru64) versions of sed # would mistakenly tack a newline onto the end of the output. diff --git a/tests/rm/rm4 b/tests/rm/rm4 index 09c3b8305..63d8029d0 100755 --- a/tests/rm/rm4 +++ b/tests/rm/rm4 @@ -1,5 +1,5 @@ #!/bin/sh -# ensure that `rm dir' fails without --recursive +# ensure that 'rm dir' fails without --recursive # Copyright (C) 2002, 2004, 2006-2012 Free Software Foundation, Inc. diff --git a/tests/rm/rm5 b/tests/rm/rm5 index 947533433..2201ec469 100755 --- a/tests/rm/rm5 +++ b/tests/rm/rm5 @@ -28,16 +28,16 @@ y EOF cat <<\EOF > exp || framework_failure_ -rm: descend into directory `d' -rm: remove directory `d/e' -rm: remove directory `d' +rm: descend into directory 'd' +rm: remove directory 'd/e' +rm: remove directory 'd' EOF rm -ir d < in > out 2>&1 || fail=1 -# Given input like `rm: ...? rm: ...? ' (no trailing newline), -# the `head...' part of the pipeline below removes the trailing space, so +# Given input like 'rm: ...? rm: ...? ' (no trailing newline), +# the 'head...' part of the pipeline below removes the trailing space, so # that sed doesn't have to deal with a line lacking a terminating newline. # This avoids a bug whereby some vendor-provided (Tru64) versions of sed # would mistakenly tack a newline onto the end of the output. diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1 index a6bf9ab97..8f1e74605 100755 --- a/tests/rm/sunos-1 +++ b/tests/rm/sunos-1 @@ -20,7 +20,7 @@ # On SunOS 4.1.3, running rm -r '' in a nonempty directory may # actually remove files with names of entries in the current directory -# but relative to `/' rather than relative to the current directory. +# but relative to '/' rather than relative to the current directory. . "${srcdir=.}/init.sh"; path_prepend_ ../src print_ver_ rm diff --git a/tests/rm/unread2 b/tests/rm/unread2 index 9b352d460..46fc98cd8 100755 --- a/tests/rm/unread2 +++ b/tests/rm/unread2 @@ -27,7 +27,7 @@ chmod u-r a # This should fail. rm -rf a > out 2>&1 && fail=1 cat <<\EOF > exp -rm: cannot remove `a': Permission denied +rm: cannot remove 'a': Permission denied EOF compare exp out || fail=1 diff --git a/tests/rm/v-slash b/tests/rm/v-slash index 113a19ae3..2fae859b2 100755 --- a/tests/rm/v-slash +++ b/tests/rm/v-slash @@ -25,8 +25,8 @@ touch a/x || framework_failure_ rm --verbose -r a/// > out || fail=1 cat <<\EOF > exp || fail=1 -removed `a/x' -removed directory: `a' +removed 'a/x' +removed directory: 'a' EOF compare exp out || fail=1 |