diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2012-04-04 15:06:17 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-04-04 16:09:49 +0200 |
commit | 7e0ef7c035a4ef331dfd5019465ad00171a7b800 (patch) | |
tree | 5454d016ddd45be60a1b31a92775e0fc8291aa52 /tests | |
parent | 9cf086f31804c0fb1460e99080a12fb455659206 (diff) | |
download | coreutils-7e0ef7c035a4ef331dfd5019465ad00171a7b800.tar.xz |
tests: avoid unnecessary subshells in misc/stty
* tests/misc/stty: Don't waste a subshell to perform this:
eval rev=\$REV_$opt. Fix rev1,rev2 assignments similarly.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/misc/stty | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/misc/stty b/tests/misc/stty index 97020e8fe..1b082c2b8 100755 --- a/tests/misc/stty +++ b/tests/misc/stty @@ -70,7 +70,7 @@ for opt in $options; do # Likewise, 'stty -cread' would fail, so skip that, too. test $opt = cread && continue - rev=$(eval echo "\$REV_$opt") + eval rev=\$REV_$opt if test -n "$rev"; then stty -$opt || { fail=1; echo -$opt; } fi @@ -84,8 +84,8 @@ if test -n "$RUN_LONG_TESTS"; then stty $opt1 $opt2 || fail=1 - rev1=$(eval echo "\$REV_$opt1") - rev2=$(eval echo "\$REV_$opt2") + eval rev1=\$REV_$opt1 + eval rev2=\$REV_$opt2 if test -n "$rev1"; then stty -$opt1 $opt2 || fail=1 fi |