summaryrefslogtreecommitdiff
path: root/tests/stty/basic-1
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-02-08 04:01:34 +0000
committerJim Meyering <jim@meyering.net>1999-02-08 04:01:34 +0000
commit0bf08d23cd4ba54fde633ff7e38ec029333d3508 (patch)
tree55869de175663cf3e3563f9bcd155e999bad7f00 /tests/stty/basic-1
parented2d3ddb6b4af6547e75f6123b6939086cb3e06c (diff)
downloadcoreutils-0bf08d23cd4ba54fde633ff7e38ec029333d3508.tar.xz
Run all tests even if some fails.
Don't use trap.
Diffstat (limited to 'tests/stty/basic-1')
-rwxr-xr-xtests/stty/basic-124
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/stty/basic-1 b/tests/stty/basic-1
index 2d2e7d191..4a44aa626 100755
--- a/tests/stty/basic-1
+++ b/tests/stty/basic-1
@@ -20,21 +20,20 @@ REV_ctlecho=1 REV_echoke=1 REV_crtkill=1 REV_evenp=1 REV_parity=1
REV_oddp=1 REV_nl=1 REV_cooked=1 REV_raw=1 REV_pass8=1 REV_litout=1
REV_cbreak=1 REV_decctlq=1 REV_tabs=1 REV_lcase=1 REV_LCASE=1
+fail=0
saved_state=.saved-state
-stty --save > $saved_state || exit 1
-trap "status=$?; stty `cat $saved_state`; rm -f $saved_state; exit $status" \
- 0 1 2 3 15
-stty `cat $saved_state` || exit 1
+stty --save > $saved_state || fail=1
+stty `cat $saved_state` || fail=1
# Build a list of all boolean options stty accepts on this system.
options=`stty -a|tail +2|tr ';' '\012'|sed '/ = /d;s/^ //'|tr -s ' -' '\012'`
# Take them one at a time, with and without the leading `-'.
for opt in $options; do
- stty $opt || exit 1
+ stty $opt || fail=1
rev=`eval echo "\\\$REV_$opt"`
if test -n "$rev"; then
- stty -$opt || exit 1
+ stty -$opt || fail=1
fi
done
@@ -44,21 +43,24 @@ if test -n "$RUN_LONG_TESTS"; then
echo .|tr -d '\012'
for opt2 in $options; do
- stty $opt1 $opt2 || exit 1
+ stty $opt1 $opt2 || fail=1
rev1=`eval echo "\\\$REV_$opt1"`
rev2=`eval echo "\\\$REV_$opt2"`
if test -n "$rev1"; then
- stty -$opt1 $opt2 || exit 1
+ stty -$opt1 $opt2 || fail=1
fi
if test -n "$rev2"; then
- stty $opt1 -$opt2 || exit 1
+ stty $opt1 -$opt2 || fail=1
fi
if test "$rev1$rev2" = 11; then
- stty -$opt1 -$opt2 || exit 1
+ stty -$opt1 -$opt2 || fail=1
fi
done
done
fi
-exit 0
+stty `cat $saved_state`
+rm -f $saved_state
+
+exit $fail