summaryrefslogtreecommitdiff
path: root/tests/misc/tac-2-nonseekable.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/tac-2-nonseekable.sh')
-rwxr-xr-xtests/misc/tac-2-nonseekable.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/misc/tac-2-nonseekable.sh b/tests/misc/tac-2-nonseekable.sh
index c27694c17..a4a35ab9d 100755
--- a/tests/misc/tac-2-nonseekable.sh
+++ b/tests/misc/tac-2-nonseekable.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# ensure that tac works with two or more non-seekable inputs
+# ensure that tac works with non-seekable or quasi-seekable inputs
# Copyright (C) 2011-2014 Free Software Foundation, Inc.
@@ -24,4 +24,16 @@ echo x > exp || fail=1
compare exp out || fail=1
compare /dev/null err || fail=1
+# Make sure it works on funny files in /proc and /sys.
+
+for file in /proc/version /sys/kernel/profiling; do
+ if test -r $file; then
+ cp -f $file copy &&
+ tac copy > exp1 || framework_failure_
+
+ tac $file > out1 || fail=1
+ compare exp1 out1 || fail=1
+ fi
+done
+
Exit $fail