blob: 9e1cb6491632cbf7619eb00f93ce20d84c70db39 [file] [log] [blame]
Jari Aalto31859422009-01-12 13:36:28 +00001# 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-$$