summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-02-23 15:15:41 +0000
committerjilles <jilles@FreeBSD.org>2013-02-23 15:15:41 +0000
commit9b619254ca339d50462a2ab033e4cb5c94b8c676 (patch)
treea717e3684684b9871d738efcb9e07848ff2a96ee /tools
parent8ca73cd0cf0b0f0dce53840b864ee25cf2f2ebbb (diff)
downloadFreeBSD-src-9b619254ca339d50462a2ab033e4cb5c94b8c676.zip
FreeBSD-src-9b619254ca339d50462a2ab033e4cb5c94b8c676.tar.gz
sh: Test that the exit status is 1 if read encounters EOF.
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/bin/sh/builtins/read6.05
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/builtins/read6.0 b/tools/regression/bin/sh/builtins/read6.0
new file mode 100644
index 0000000..2168e10
--- /dev/null
+++ b/tools/regression/bin/sh/builtins/read6.0
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+: | read x
+r=$?
+[ "$r" = 1 ]
OpenPOWER on IntegriCloud