summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-01-10 21:12:38 +0000
committerPádraig Brady <P@draigBrady.com>2015-01-10 21:18:33 +0000
commiteef0cd62dd63c12e28b1c7779fb149a8a30f8fe7 (patch)
tree789e43749002627c935449f8b60584ad1a78367a /tests/misc
parentfb13cdc727541adef0010279f770f2afa358002e (diff)
downloadcoreutils-eef0cd62dd63c12e28b1c7779fb149a8a30f8fe7.tar.xz
maint: clean up some test issues identified with shellcheck
* tests/cp/cp-a-selinux.sh: Comment why unused variables are assigned. Fix misspellings noticed while adjusting. * tests/cp/fiemap-perf.sh: Fix quoting. * tests/misc/shuf.sh: Avoid useless use of cat. * tests/misc/printf-surprise.sh: Likewise.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/printf-surprise.sh2
-rwxr-xr-xtests/misc/shuf.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/misc/printf-surprise.sh b/tests/misc/printf-surprise.sh
index d8d967d85..0af64482d 100755
--- a/tests/misc/printf-surprise.sh
+++ b/tests/misc/printf-surprise.sh
@@ -63,7 +63,7 @@ exit=$?
# Map this longer, and rarer, diagnostic to the common one.
# printf: cannot perform formatted output: Cannot allocate memory" \
sed 's/cannot perform .*/write error/' err-msg > k && mv k err-msg
-err_msg=$(cat err-msg|tr '\n' :)
+err_msg=$(tr '\n' : < err-msg)
# By some bug, on Solaris 11 (5.11 snv_86), err_msg ends up
# containing '1> fifo:printf: write error:'. Recognize that, too.
diff --git a/tests/misc/shuf.sh b/tests/misc/shuf.sh
index 34f422507..c7db14f60 100755
--- a/tests/misc/shuf.sh
+++ b/tests/misc/shuf.sh
@@ -125,7 +125,7 @@ test "$c" = "0 1 2 3 4 5 6 7 8 9" ||
# check --repeat with non-zero low value
shuf --rep -i222-233 -n2000 > exp || framework_failure_
-c=$(cat exp | sort -nu | paste -s -d ' ') || framework_failure_
+c=$(sort -nu exp | paste -s -d ' ') || framework_failure_
test "$c" = "222 223 224 225 226 227 228 229 230 231 232 233" ||
{ fail=1; echo "--repeat produced bad output with non-zero low">&2 ; }