summaryrefslogtreecommitdiff
path: root/tests/read.tests
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2019-01-07 09:27:52 -0500
committerChet Ramey <chet.ramey@case.edu>2019-01-07 09:27:52 -0500
commitd233b485e83c3a784b803fb894280773f16f2deb (patch)
tree16d51f3ccca2d4ad2d8f2da564d68ca848de595b /tests/read.tests
parent64447609994bfddeef1061948022c074093e9a9f (diff)
downloadbash-d233b485e83c3a784b803fb894280773f16f2deb.tar.gz
bash-5.0 distribution sources and documentationbash-5.0
Diffstat (limited to 'tests/read.tests')
-rw-r--r--tests/read.tests26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/read.tests b/tests/read.tests
index fe27dae3..f67cd00e 100644
--- a/tests/read.tests
+++ b/tests/read.tests
@@ -25,43 +25,43 @@ echo $'\177' | ( read ; recho "$REPLY" )
# the input stream
echo $'ab\\\ncd' | ( read ; recho "$REPLY" )
-echo "A B " > /tmp/IN
+echo "A B " > $TMPDIR/IN
unset x y z
-read x y z < /tmp/IN
+read x y z < $TMPDIR/IN
echo 1: "x[$x] y[$y] z[$z]"
echo 1a: ${z-z not set}
-read x < /tmp/IN
+read x < $TMPDIR/IN
echo 2: "x[$x]"
-rm /tmp/IN
+rm $TMPDIR/IN
# this is where the bash `read' behavior with respect to $REPLY differs
# from ksh93
-echo "A B " > /tmp/IN
+echo "A B " > $TMPDIR/IN
-read < /tmp/IN
+read < $TMPDIR/IN
echo "[$REPLY]"
-rm /tmp/IN
+rm $TMPDIR/IN
-echo " A B " > /tmp/IN
+echo " A B " > $TMPDIR/IN
-read < /tmp/IN
+read < $TMPDIR/IN
echo "[$REPLY]"
-rm /tmp/IN
+rm $TMPDIR/IN
# make sure that read with more variables than words sets the extra
# variables to the empty string
bvar=bvar
cvar=cvar
-echo aa > /tmp/IN
-read avar bvar cvar < /tmp/IN
+echo aa > $TMPDIR/IN
+read avar bvar cvar < $TMPDIR/IN
echo =="$avar"==
echo =="$bvar"==
echo =="$cvar"==
-rm /tmp/IN
+rm $TMPDIR/IN
# test behavior of read with various settings of IFS