1 # $FreeBSD: head/bin/sh/tests/builtins/fc2.0 213738 2010-10-12 18:20:38Z obrien $
3 trap 'echo Broken pipe -- test failed' PIPE
7 T=$(mktemp -d sh-test.XXXXXX)
10 mkfifo input output error
11 HISTFILE=/dev/null ${SH} +m -i <input >output 2>error &
14 # Command not found, containing slash
15 echo '/var/empty/nonexistent' >&3
16 # Read error message, shell will read new input now
18 # Execute bad command again
19 echo 'fc -e true; echo continued' >&3
21 read line <&4 && [ "$line" = continued ] && : ${rc:=0}
23 # Old sh duplicates itself after the fc, producing another line
25 if read line <&4; then
26 echo "Extraneous output: $line"