heredoc8.0 revision 211405
1211405Sjilles# $FreeBSD: head/tools/regression/bin/sh/parser/heredoc8.0 211405 2010-08-16 21:14:49Z jilles $ 2211405Sjilles 3211405Sjillesfailures=0 4211405Sjilles 5211405Sjillescheck() { 6211405Sjilles if ! eval "[ $* ]"; then 7211405Sjilles echo "Failed: $*" 8211405Sjilles : $((failures += 1)) 9211405Sjilles fi 10211405Sjilles} 11211405Sjilles 12211405Sjilless='ast*que?non' sq=\' dq=\" 13211405Sjilles 14211405Sjilles# This is possibly useful but differs from other shells. 15211405Sjillescheck '"$(cat <<EOF 16211405Sjilles${s+"x"} 17211405SjillesEOF 18211405Sjilles)" = ${dq}x${dq}' 19211405Sjilles 20211405Sjillesexit $((failures != 0)) 21