bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] fix minor shell issues in test suite


From: Ralf Wildenhues
Subject: [PATCH] fix minor shell issues in test suite
Date: Tue, 9 Sep 2008 19:45:25 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

* tests/misc/help-version: Fix bad quoting.
* tests/cp/same-file: Fix unportable shell quoting.
* tests/mv/part-symlink: Likewise.
---

Hello Jim,

the "`..."..."...`" in part-symlink is unportable (see Autoconf manual).
I figured let's adjust same-file likewise so if you add inner "..." bits
it doesn't happen again.  The help-version issue is funny, do you not
use syntax highlighting for shell scripts?

Cheers,
Ralf

 tests/cp/same-file      |    4 ++--
 tests/misc/help-version |    4 ++--
 tests/mv/part-symlink   |    8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/cp/same-file b/tests/cp/same-file
index e5cc823..23157d2 100755
--- a/tests/cp/same-file
+++ b/tests/cp/same-file
@@ -110,10 +110,10 @@ for args in 'foo symlink' 'symlink foo' 'foo foo' 'sl1 
sl2' 'foo hardlink'; do
          ' _err
         fi
        # Strip off all but the file names.
-       ls="`ls -gG --ignore=_err . \
+       ls=`ls -gG --ignore=_err . \
            | sed \
                -e '/^total /d' \
-               -e 's/^[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *//'`"
+               -e 's/^[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *//'`
        echo "($ls)"
        # Make sure the original is unchanged and that
        # the destination is a copy.
diff --git a/tests/misc/help-version b/tests/misc/help-version
index 77d37bb..b50774e 100755
--- a/tests/misc/help-version
+++ b/tests/misc/help-version
@@ -51,8 +51,8 @@ for lang in C fr da; do
 
     # false fails even when invoked with --help or --version.
     if test $i = false; then
-      env LC_MESSAGES=$lang $i" --help >/dev/null && fail=1
-      env LC_MESSAGES=$lang $i" --version >/dev/null && fail=1
+      env LC_MESSAGES=$lang $i --help >/dev/null && fail=1
+      env LC_MESSAGES=$lang $i --version >/dev/null && fail=1
       continue
     fi
 
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink
index 9262524..3feedca 100755
--- a/tests/mv/part-symlink
+++ b/tests/mv/part-symlink
@@ -99,18 +99,18 @@ for copy in cp mv; do
            }
          # Strip off all but the file names.
          # Remove any site-dependent part of each file name.
-         ls="`ls -gG --ignore=.err . \
+         ls=`ls -gG --ignore=.err . \
              | sed \
                  -e '/^total /d' \
                  -e s,$other_partition_tmpdir/,, \
                  -e "s,$pwd_tmp/,," \
-                 -e 's/^[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *//'`"
-         ls2="`cd $other_partition_tmpdir && ls -gG --ignore=.err . \
+                 -e 's/^[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *//'`
+         ls2=`cd $other_partition_tmpdir && ls -gG --ignore=.err . \
              | sed \
                  -e '/^total /d' \
                  -e s,$other_partition_tmpdir/,, \
                  -e "s,$pwd_tmp/,," \
-                 -e 's/^[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *//'`"
+                 -e 's/^[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *//'`
          echo "($ls) ($ls2)"
 
          # If the command failed, then it must not have changed the files.
-- 
1.6.0.1.286.g599f2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]