summaryrefslogtreecommitdiff
path: root/gnulib-tests/test-yesno.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib-tests/test-yesno.sh')
-rwxr-xr-xgnulib-tests/test-yesno.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnulib-tests/test-yesno.sh b/gnulib-tests/test-yesno.sh
index 9d195413..8bc50a88 100755
--- a/gnulib-tests/test-yesno.sh
+++ b/gnulib-tests/test-yesno.sh
@@ -49,6 +49,14 @@ echo yes | test-yesno 2 > out1.tmp || fail=1
LC_ALL=C tr -d "$cr" < out1.tmp > out.tmp || fail=1
cmp xout.tmp out.tmp || fail=1
+# Test for behavior with no EOL at EOF
+cat <<EOF > xout.tmp
+Y
+EOF
+printf y | test-yesno 1 > out1.tmp || fail=1
+LC_ALL=C tr -d "$cr" < out1.tmp > out.tmp || fail=1
+cmp xout.tmp out.tmp || fail=1
+
# Test for behavior on EOF
cat <<EOF > xout.tmp
N