]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: split/l-chunk: avoid a portability issue
authorPádraig Brady <P@draigBrady.com>
Thu, 1 Sep 2011 14:43:25 +0000 (15:43 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 1 Sep 2011 14:43:25 +0000 (15:43 +0100)
* tests/split/l-chunk: Don't use the `test "$var"`
idiom to test that var is set to something as
that's not supported by all shells.
The new style matches the usage is the rest of
the test in any case.
Reported by Bruno Haible on AIX 6.1 and 7.1

tests/split/l-chunk

index 7bf698989a1a3837df9fdc0ce39b1ee5e1d03b79..e1c9ec7d891b7542ce5b2b507832c43b511c0ac3 100755 (executable)
@@ -108,7 +108,7 @@ for ELIDE_EMPTY in '' '-e'; do
         echo "$lines"
       fi
     done
-    test "$ELIDE_EMPTY" && EXP=exp.elide_empty || EXP=exp
+    test -z "$ELIDE_EMPTY" && EXP=exp || EXP=exp.elide_empty
     compare out $EXP || fail=1
   done
 done