tests: adjust \`...' quoting to '...' to adapt to latest gnulib
authorJim Meyering <meyering@redhat.com>
Sat, 7 Jan 2012 16:43:50 +0000 (17:43 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 9 Jan 2012 20:50:08 +0000 (21:50 +0100)
Run this:
  git grep -l "\\\\\`[^']*'" tests \
    |xargs perl -pi -e 's/\\\`(.*?'\'')/'\''$1/g

36 files changed:
tests/chgrp/no-x
tests/chmod/c-option
tests/chmod/equal-x
tests/chmod/no-x
tests/chmod/thru-dangling
tests/chown/basic
tests/cp/abuse
tests/cp/cp-i
tests/cp/thru-dangling
tests/dd/skip-seek-past-dev
tests/dd/skip-seek-past-file
tests/du/no-x
tests/du/slink
tests/id/gnu-zero-uids
tests/init.cfg
tests/install/install-C
tests/install/install-C-root
tests/install/install-C-selinux
tests/misc/help-version
tests/misc/ls-time
tests/misc/truncate-fail-diag
tests/misc/uniq
tests/mkdir/selinux
tests/mv/dup-source
tests/mv/force
tests/mv/i-2
tests/mv/i-3
tests/mv/mv-n
tests/mv/mv-special-1
tests/mv/part-fail
tests/mv/trailing-slash
tests/rm/rm3
tests/rm/unreadable
tests/split/l-chunk
tests/touch/fail-diag
tests/touch/not-owner

index 56357fe..200fa32 100755 (executable)
@@ -46,7 +46,7 @@ sed "s/^$prog: cannot read directory /$prog: /" out > t && mv t out
 sed 's,d/no-x/y,d/no-x,' out > t && mv t out
 
 cat <<EOF > exp
-$prog: \`d/no-x': Permission denied
+$prog: 'd/no-x': Permission denied
 EOF
 
 compare exp out || fail=1
index 525c8cb..e2fbf07 100755 (executable)
@@ -33,7 +33,7 @@ chmod -c g=rwx $file > empty || fail=1
 
 test -s empty && fail=1
 case "`cat out`" in
-  "mode of \`f' changed from 0744 "?rwxr--r--?" to 0774 "?rwxrwxr--?) ;;
+  "mode of 'f' changed from 0744 "?rwxr--r--?" to 0774 "?rwxrwxr--?) ;;
   *) cat out; fail=1 ;;
 esac
 
index 76783eb..e846fc3 100755 (executable)
@@ -27,7 +27,7 @@ for mode in =x =xX =Xx =x,=X =X,=x; do
   chmod a=r,$mode $file || fail=1
   case "`ls -l $file`" in
     ---x--x---*) ;;
-    *) fail=1; echo "after \`chmod $mode $file':"; ls -l $file ;;
+    *) fail=1; echo "after 'chmod $mode $file':"; ls -l $file ;;
   esac
 done
 
index 41ec757..3a68eea 100755 (executable)
@@ -41,7 +41,7 @@ sed "s/^$prog: cannot read directory /$prog: /" out > t && mv t out
 sed 's,d/no-x/y,d/no-x,' out > t && mv t out
 
 cat <<EOF > exp
-$prog: \`d/no-x': Permission denied
+$prog: 'd/no-x': Permission denied
 EOF
 
 compare exp out || fail=1
index f8c02f5..7812400 100755 (executable)
@@ -25,7 +25,7 @@ ln -s non-existent dangle || framework_failure_
 # This operation cannot succeed since the symbolic link dangles.
 chmod 644 dangle 2> out && fail=1
 
-echo "chmod: cannot operate on dangling symlink \`dangle'" > exp
+echo "chmod: cannot operate on dangling symlink 'dangle'" > exp
 compare exp out || fail=1
 
 Exit $fail
index d602e18..f5958b7 100755 (executable)
@@ -30,12 +30,12 @@ set _ `ls -n f`; shift; test "$3:$4" = 0:1 || fail=1
 # Make sure the correct diagnostic is output
 # Note we output a name even though an id was specified.
 chown -v --from=42 43 f > out || fail=1
-printf "ownership of \`f' retained as `id -nu`\n" > exp
+printf "ownership of 'f' retained as `id -nu`\n" > exp
 compare exp out || fail=1
 
 # Ensure diagnostics work for non existent files.
 chown -v 0 nf > out && fail=1
-printf "failed to change ownership of \`nf' to 0\n" > exp
+printf "failed to change ownership of 'nf' to 0\n" > exp
 compare exp out || fail=1
 
 chown --from=0:1 2:010 f || fail=1
index e569222..6338e1f 100755 (executable)
@@ -23,7 +23,7 @@ mkdir a b c || framework_failure_
 ln -s ../t a/1 || framework_failure_
 echo payload > b/1 || framework_failure_
 
-echo "cp: will not copy \`b/1' through just-created symlink \`c/1'" \
+echo "cp: will not copy 'b/1' through just-created symlink 'c/1'" \
   > exp || framework_failure_
 
 # Check both cases: a dangling symlink, and one pointing to a writable file.
index 030f652..746dc27 100755 (executable)
@@ -28,7 +28,7 @@ echo n | cp -iR a b 2>/dev/null || fail=1
 
 # test miscellaneous combinations of -f -i -n parameters
 touch c d || framework_failure_
-echo "\`c' -> \`d'" > out_copy
+echo "'c' -> 'd'" > out_copy
 > out_empty
 
 # ask for overwrite, answer no
index 4d17ec3..f8527af 100755 (executable)
@@ -22,7 +22,7 @@ print_ver_ cp
 ln -s no-such dangle || framework_failure_
 echo hi > f || framework_failure_
 echo hi > exp || framework_failure_
-echo "cp: not writing through dangling symlink \`dangle'" \
+echo "cp: not writing through dangling symlink 'dangle'" \
     > exp-err || framework_failure_
 
 
index a8e0a2f..f4184b1 100755 (executable)
@@ -43,14 +43,14 @@ DEV_OFLOW=$(expr $dev_size + 1)
 
 timeout 10 dd bs=1 skip=$DEV_OFLOW count=0 status=noxfer < "$device" 2> err
 test "$?" = "1" || fail=1
-echo "dd: \`standard input': cannot skip: Invalid argument
+echo "dd: 'standard input': cannot skip: Invalid argument
 0+0 records in
 0+0 records out" > err_ok || framework_failure_
 compare err_ok err || fail=1
 
 timeout 10 dd bs=1 seek=$DEV_OFLOW count=0 status=noxfer > "$device" 2> err
 test "$?" = "1" || fail=1
-echo "dd: \`standard output': cannot seek: Invalid argument
+echo "dd: 'standard output': cannot seek: Invalid argument
 0+0 records in
 0+0 records out" > err_ok || framework_failure_
 compare err_ok err || fail=1
index 46d9156..ea8f1c9 100755 (executable)
@@ -25,7 +25,7 @@ eval $(getlimits) # for OFF_T limits
 printf "1234" > file || framework_failure_
 
 echo "\
-dd: \`standard input': cannot skip to specified offset
+dd: 'standard input': cannot skip to specified offset
 0+0 records in
 0+0 records out" > skip_err || framework_failure_
 
index 1737c01..9ba7077 100755 (executable)
@@ -41,7 +41,7 @@ sed "s/^$prog: cannot read directory /$prog: /" out > t && mv t out
 sed 's,d/no-x/y,d/no-x,' out > t && mv t out
 
 cat <<EOF > exp
-$prog: \`d/no-x': Permission denied
+$prog: 'd/no-x': Permission denied
 EOF
 
 compare exp out || fail=1
index 4117d8e..99677f9 100755 (executable)
@@ -27,7 +27,7 @@ require_local_dir_
 if df --type=xfs . >/dev/null 2>&1; then
   # At least on Irix-6.5.19, when using an xfs file system,
   # each created symlink (name lengths up to 255) would have a size of `0'.
-  skip_ "\`.' is on an XFS file system"
+  skip_ "'.' is on an XFS file system"
 fi
 
 symlink_name_lengths='1 15 16 31 32 59 60 63 64 127 128 255 256 511 512 1024'
index 937f8a8..858004c 100755 (executable)
@@ -21,7 +21,7 @@ print_ver_ id
 
 require_gnu_
 
-sush - true || skip_ "the \`sush' command does not work"
+sush - true || skip_ "the 'sush' command does not work"
 
 # Run `id' with zero UIDs.  It should exit with a non-zero status.
 sush - id > out && fail=1
index 50c752b..4379698 100644 (file)
@@ -191,13 +191,13 @@ uid_is_privileged_()
 {
   # Make sure id -u succeeds.
   my_uid=$(id -u) \
-    || { echo "$0: cannot run \`id -u'" 1>&2; return 1; }
+    || { echo "$0: cannot run 'id -u'" 1>&2; return 1; }
 
   # Make sure it gives valid output.
   case $my_uid in
     0) ;;
     *[!0-9]*)
-      echo "$0: invalid output (\`$my_uid') from \`id -u'" 1>&2
+      echo "$0: invalid output ('$my_uid') from 'id -u'" 1>&2
       return 1 ;;
     *) return 1 ;;
   esac
index 67921da..0883d9e 100755 (executable)
@@ -26,9 +26,9 @@ mode3=2755
 
 
 echo test > a || framework_failure_
-echo "\`a' -> \`b'" > out_installed_first || framework_failure_
-echo "removed \`b'
-\`a' -> \`b'" > out_installed_second || framework_failure_
+echo "'a' -> 'b'" > out_installed_first || framework_failure_
+echo "removed 'b'
+'a' -> 'b'" > out_installed_second || framework_failure_
 : > out_empty || framework_failure_
 
 # destination file does not exist
@@ -57,8 +57,8 @@ compare out out_installed_second || fail=1
 ln -s a c || framework_failure_
 ln -s b d || framework_failure_
 ginstall -Cv -m$mode1 c d > out || fail=1
-echo "removed \`d'
-\`c' -> \`d'" > out_installed_second_cd
+echo "removed 'd'
+'c' -> 'd'" > out_installed_second_cd
 compare out out_installed_second_cd || fail=1
 
 # destination file exists but content differs
index 86f0814..5fbae05 100755 (executable)
@@ -28,9 +28,9 @@ g2=2
 
 
 echo test > a || framework_failure_
-echo "\`a' -> \`b'" > out_installed_first
-echo "removed \`b'
-\`a' -> \`b'" > out_installed_second
+echo "'a' -> 'b'" > out_installed_first
+echo "removed 'b'
+'a' -> 'b'" > out_installed_second
 > out_empty
 
 # destination file does not exist
index 5529793..db2a5d2 100755 (executable)
@@ -24,9 +24,9 @@ require_selinux_
 echo test > a || framework_failure_
 chcon -u system_u a || skip_ "chcon doesn't work"
 
-echo "\`a' -> \`b'" > out_installed_first
-echo "removed \`b'
-\`a' -> \`b'" > out_installed_second
+echo "'a' -> 'b'" > out_installed_first
+echo "removed 'b'
+'a' -> 'b'" > out_installed_second
 > out_empty
 
 # destination file does not exist
index bba6d36..b93eb37 100755 (executable)
@@ -107,7 +107,7 @@ for lang in C fr da; do
         : # ok
       else
         fail=1
-        echo "*** $i: bad exit status \`$status' (expected $expected)," 1>&2
+        echo "*** $i: bad exit status '$status' (expected $expected)," 1>&2
         echo "  with --help or --version output redirected to /dev/full" 1>&2
       fi
     fi
index 8bf3a5e..6a227c4 100755 (executable)
@@ -64,7 +64,7 @@ case "$*" in
 A basic test of touch -m has just failed, so the subsequent
 tests in this file will not be run.
 
-In the output below, the date of last modification for \`a' should
+In the output below, the date of last modification for 'a' should
 have been $t3.
 EOF
   #`
@@ -83,7 +83,7 @@ case "$*" in
 A fundamental touch -a test has just failed, so the subsequent
 tests in this file will not be run.
 
-In the output below, the date of last access for \`a' should
+In the output below, the date of last access for 'a' should
 have been $u1.
 EOF
   ls --full -lu a
index 7cc6a63..f9cdabf 100755 (executable)
@@ -30,14 +30,14 @@ d1=no
 dir=$d1/such-dir
 truncate -s0 $dir > out 2>&1 && fail=1
 cat <<EOF > exp
-truncate: cannot open \`$dir' for writing: No such file or directory
+truncate: cannot open '$dir' for writing: No such file or directory
 EOF
 compare exp out || fail=1
 
 dir=$d1/
 truncate -s0 $dir > out 2>&1 && fail=1
 #The following can be returned at least
-#truncate: cannot open \`$dir' for writing: Not a directory
-#truncate: cannot open \`$dir' for writing: Is a directory
+#truncate: cannot open '$dir' for writing: Not a directory
+#truncate: cannot open '$dir' for writing: Is a directory
 
 Exit $fail
index 84e1c48..f7211a3 100755 (executable)
@@ -186,11 +186,11 @@ my @Tests =
   {IN=>"a\na\nb\nc\nc\n"}, {OUT=>"\na\na\n\nc\nc\n"}],
  ['118', '--all-repeated=prepend', {IN=>"a\nb\n"}, {OUT=>""}],
  ['119', '--all-repeated=badoption', {IN=>"a\n"}, {OUT=>""}, {EXIT=>1},
-  {ERR=>"$prog: invalid argument \`badoption' for \`--all-repeated'\n"
+  {ERR=>"$prog: invalid argument 'badoption' for '--all-repeated'\n"
         . "Valid arguments are:\n"
-        . "  - \`none'\n"
-        . "  - \`prepend'\n"
-        . "  - \`separate'\n"
+        . "  - 'none'\n"
+        . "  - 'prepend'\n"
+        . "  - 'separate'\n"
         . $try}],
  # Check that -d and -u suppress all output, as POSIX requires.
  ['120', qw(-d -u), {IN=>"a\na\n\b"}, {OUT=>""}],
index ddca178..7632362 100755 (executable)
@@ -25,7 +25,7 @@ print_ver_ mkdir mkfifo mknod
 require_selinux_enforcing_
 
 c=invalid-selinux-context
-msg="failed to set default file creation context to \`$c':"
+msg="failed to set default file creation context to '$c':"
 
 # Test each of mkdir, mknod, mkfifo with "-Z invalid-context".
 
index a6a1f5c..7a34472 100755 (executable)
@@ -41,9 +41,9 @@ for i in cp; do
   rm -fr a d; touch a; mkdir d
   $i --backup a a d/ 2>> out && fail=1
   cat <<EOF > exp
-$i: warning: source file \`a' specified more than once
-$i: warning: source file \`a' specified more than once
-$i: will not overwrite just-created \`d/a' with \`a'
+$i: warning: source file 'a' specified more than once
+$i: warning: source file 'a' specified more than once
+$i: will not overwrite just-created 'd/a' with 'a'
 EOF
   compare exp out || fail=1
 done
@@ -56,8 +56,8 @@ for i in mv; do
   rm -fr a d; touch a; mkdir d
   $i ./a a d/ 2>> out && fail=1
   cat <<EOF > exp
-$i: cannot stat \`a': No such file or directory
-$i: cannot stat \`a': No such file or directory
+$i: cannot stat 'a': No such file or directory
+$i: cannot stat 'a': No such file or directory
 EOF
   compare exp out || fail=1
 done
index d4b3a16..320ab56 100755 (executable)
@@ -29,7 +29,7 @@ ln $ff $ff2 || framework_failure_
 mv $ff $ff > out 2>&1 && fail=1
 
 cat > exp <<EOF
-mv: \`$ff' and \`$ff' are the same file
+mv: '$ff' and '$ff' are the same file
 EOF
 
 compare exp out || fail=1
index 47eef6f..875c721 100755 (executable)
@@ -36,7 +36,7 @@ cp -if e f < y > out 2>&1 || fail=1
 
 # Make sure out contains the prompt.
 case "`cat out`" in
-  "cp: try to overwrite \`f', overriding mode 0000 (---------)?"*) ;;
+  "cp: try to overwrite 'f', overriding mode 0000 (---------)?"*) ;;
   *) fail=1 ;;
 esac
 
index 33176e4..1851d42 100755 (executable)
@@ -46,7 +46,7 @@ check_overwrite_prompt()
 {
   local delay="$1"
   case "`cat out`" in
-    "mv: try to overwrite \`g', overriding mode 0000"*) ;;
+    "mv: try to overwrite 'g', overriding mode 0000"*) ;;
     *) sleep $delay; return 1;;
   esac
 }
index fff97fd..9a9b115 100755 (executable)
@@ -22,7 +22,7 @@ print_ver_ mv
 
 # test miscellaneous combinations of -f -i -n parameters
 touch a b || framework_failure_
-echo "\`a' -> \`b'" > out_move
+echo "'a' -> 'b'" > out_move
 > out_empty
 
 # ask for overwrite, answer no
index 64ac0ff..02b681e 100755 (executable)
@@ -52,16 +52,16 @@ sed "
 " out | sort > out2
 
 cat <<EOF | sort > exp
-\`$null' -> \`XXX/$null'
-\`$dir' -> \`XXX/$dir'
-\`$dir/a' -> \`XXX/$dir/a'
-\`$dir/a/b' -> \`XXX/$dir/a/b'
-\`$dir/a/b/c' -> \`XXX/$dir/a/b/c'
-\`$dir/a/b/c/file1' -> \`XXX/$dir/a/b/c/file1'
-\`$dir/d' -> \`XXX/$dir/d'
-\`$dir/d/e' -> \`XXX/$dir/d/e'
-\`$dir/d/e/f' -> \`XXX/$dir/d/e/f'
-\`$dir/d/e/f/file2' -> \`XXX/$dir/d/e/f/file2'
+'$null' -> 'XXX/$null'
+'$dir' -> 'XXX/$dir'
+'$dir/a' -> 'XXX/$dir/a'
+'$dir/a/b' -> 'XXX/$dir/a/b'
+'$dir/a/b/c' -> 'XXX/$dir/a/b/c'
+'$dir/a/b/c/file1' -> 'XXX/$dir/a/b/c/file1'
+'$dir/d' -> 'XXX/$dir/d'
+'$dir/d/e' -> 'XXX/$dir/d/e'
+'$dir/d/e/f' -> 'XXX/$dir/d/e/f'
+'$dir/d/e/f/file2' -> 'XXX/$dir/d/e/f/file2'
 EOF
 
 compare exp out2 || fail=1
index 4fe6ddc..ed74e02 100755 (executable)
@@ -38,7 +38,7 @@ printf \
 # On some (less-compliant) systems, we get EPERM in this case.
 # Accept either diagnostic.
 cat <<EOF > exp2
-mv: cannot move \`k' to \`$other_partition_tmpdir/k': Permission denied
+mv: cannot move 'k' to '$other_partition_tmpdir/k': Permission denied
 EOF
 
 if cmp out exp >/dev/null 2>&1; then
index ae5079b..5bae2f5 100755 (executable)
@@ -52,7 +52,7 @@ done
 
 # Test for a cp-specific diagnostic introduced after coreutils-8.7:
 printf '%s\n' \
-  "cp: cannot create regular file \`no-such/': Not a directory" \
+  "cp: cannot create regular file 'no-such/': Not a directory" \
 > expected-err
 touch b
 cp b no-such/ 2> err && fail=1
index 06a93f5..17118d1 100755 (executable)
@@ -55,15 +55,15 @@ tr '?' '\n' < out | head --bytes=-1 | sed 's/^ //' |sort > o2
 mv o2 out
 
 sort <<EOF > exp || fail=1
-rm: descend into directory \`z'
-rm: remove regular empty file \`z/empty'
-rm: remove write-protected regular file \`z/fu'
-rm: remove write-protected regular empty file \`z/empty-u'
-rm: remove symbolic link \`z/slink'
-rm: remove symbolic link \`z/slinkdot'
-rm: remove directory \`z/d'
-rm: remove write-protected directory \`z/du'
-rm: remove directory \`z'
+rm: descend into directory 'z'
+rm: remove regular empty file 'z/empty'
+rm: remove write-protected regular file 'z/fu'
+rm: remove write-protected regular empty file 'z/empty-u'
+rm: remove symbolic link 'z/slink'
+rm: remove symbolic link 'z/slinkdot'
+rm: remove directory 'z/d'
+rm: remove write-protected directory 'z/du'
+rm: remove directory 'z'
 EOF
 
 compare exp out || fail=1
index 1ef9e9c..e515827 100755 (executable)
@@ -38,7 +38,7 @@ my @Tests =
      ['unreadable-2', '-rf', $d,
       {EXIT => $uid == 0 ? 0 : 1},
       {ERR => $uid == 0 ? ''
-                        : "$prog: cannot remove \`$d': Permission denied\n"},
+                        : "$prog: cannot remove '$d': Permission denied\n"},
       {PRE => sub { (mkdir $d,0700 and mkdir "$d/x",0700 and chmod 0100,$d)
                     or die "$d: $!\n"}} ],
     );
index c4e6968..8199883 100755 (executable)
@@ -24,7 +24,7 @@ echo 'split: 1o: invalid number of chunks' > exp
 split -n l/1o 2>err && fail=1
 compare exp err || fail=1
 
-echo "split: \`-': cannot determine file size" > exp
+echo "split: '-': cannot determine file size" > exp
 echo | split -n l/1 2>err && fail=1
 compare exp err || fail=1
 
index d42ee37..6cdc1e2 100755 (executable)
@@ -24,7 +24,7 @@ file=/no-such-dir/file
 
 touch $file > out 2>&1 && fail=1
 cat <<EOF > exp
-touch: cannot touch \`$file': No such file or directory
+touch: cannot touch '$file': No such file or directory
 EOF
 
 compare exp out || fail=1
index 3637111..3aba5f0 100755 (executable)
@@ -43,7 +43,7 @@ touch / > out 2>&1 && fail=1
 for msg in 'Not owner' 'Operation not permitted' 'Permission denied' \
            'Read-only file system'; do
   cat > exp <<EOF
-touch: setting times of \`/': $msg
+touch: setting times of '/': $msg
 EOF
 
   cmp out exp > /dev/null 2>&1 && { match=1; break; }