]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/source6.sub
Bash-4.3 patch 7
[thirdparty/bash.git] / tests / source6.sub
CommitLineData
3185942a
JA
1# tests sourcing non-regular files, fixed post-3.2
2
3: ${TMPDIR:=/tmp}
4
5TMPFN=$TMPDIR/foo-$$
6
7rm -f $TMPFN
8echo "echo one - OK" > $TMPFN
9. $TMPFN
10echo $?
11rm -f $TMPFN
12
13# non-regular readable file
14. /dev/null
15echo $?
16
17# FIFO or pipe via /dev/fd
18. <(echo "echo two - OK")
19echo $?
20
21# pipe
22echo "echo three - OK" | . /dev/stdin
23echo $?
24
25# FIFO
26mkfifo $TMPDIR/fifo-$$
27echo "echo four - OK" > $TMPDIR/fifo-$$ &
28sleep 1 # allow the child echo to execute
29. $TMPDIR/fifo-$$
30echo $?
31rm -f $TMPDIR/fifo-$$