* tests/misc/sort-continue: Don't run cat inside fd-limited shell.
If sort fails to run in an fd-limited shell, skip the test.
. $srcdir/test-lib.sh
+# Skip the test when running under valgrind.
+( ulimit -n 6; sort < /dev/null ) \
+ || skip_test_ 'fd-limited sort failed; are you running under valgrind?'
+
for i in $(seq 31); do
echo $i | tee -a in > __test.$i || framework_failure
done
(
ulimit -n 6
exec 3<&- 4<&- 5<&-
- cat in1 | sort -n -m __test.* - > out
+ sort -n -m __test.* - < in1 > out
) &&
compare in out || { fail=1; echo 'stdin not handled properly' 1>&2; }