heredoc4.0 revision 208655
1208655Sjilles# $FreeBSD: head/tools/regression/bin/sh/parser/heredoc4.0 208655 2010-05-30 14:11:27Z jilles $ 2208655Sjilles 3208655Sjillesfailures=0 4208655Sjilles 5208655Sjillescheck() { 6208655Sjilles if ! eval "[ $* ]"; then 7208655Sjilles echo "Failed: $*" 8208655Sjilles : $((failures += 1)) 9208655Sjilles fi 10208655Sjilles} 11208655Sjilles 12208655Sjillesf() { 13208655Sjilles cat <<EOF && echo `echo bar` 14208655Sjillesfoo 15208655SjillesEOF 16208655Sjilles} 17208655Sjillescheck '"`f`" = "foo 18208655Sjillesbar"' 19208655Sjilles 20208655Sjillesf() { 21208655Sjilles cat <<EOF && echo $(echo bar) 22208655Sjillesfoo 23208655SjillesEOF 24208655Sjilles} 25208655Sjillescheck '"$(f)" = "foo 26208655Sjillesbar"' 27208655Sjilles 28208655Sjillesf() { 29208655Sjilles echo `echo bar` && cat <<EOF 30208655Sjillesfoo 31208655SjillesEOF 32208655Sjilles} 33208655Sjillescheck '"`f`" = "bar 34208655Sjillesfoo"' 35208655Sjilles 36208655Sjillesf() { 37208655Sjilles echo $(echo bar) && cat <<EOF 38208655Sjillesfoo 39208655SjillesEOF 40208655Sjilles} 41208655Sjillescheck '"$(f)" = "bar 42208655Sjillesfoo"' 43208655Sjilles 44208655Sjillesexit $((failures != 0)) 45