From eef0cd62dd63c12e28b1c7779fb149a8a30f8fe7 Mon Sep 17 00:00:00 2001 From: Pádraig Brady
Date: Sat, 10 Jan 2015 21:12:38 +0000 Subject: 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. --- tests/misc/printf-surprise.sh | 2 +- tests/misc/shuf.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/misc') 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 ; } -- cgit v1.2.3-70-g09d2