heredoc12.0 revision 303975
1126756Smlaier# $FreeBSD: releng/11.0/bin/sh/tests/parser/heredoc12.0 271593 2014-09-14 16:46:30Z jilles $ 2126756Smlaier 3126756Smlaierfailures=0 4126756Smlaier 5126756Smlaiercheck() { 6126756Smlaier if ! eval "[ $* ]"; then 7126756Smlaier echo "Failed: $*" 8126756Smlaier : $((failures += 1)) 9126756Smlaier fi 10126756Smlaier} 11126756Smlaier 12126756Smlaierlongmark=`printf %01000d 4` 13126756Smlaierlongmarkstripped=`printf %0999d 0` 14126756Smlaier 15126756Smlaiercheck '"$(cat <<'"$longmark 16126756Smlaier$longmark"' 17126756Smlaierecho yes)" = "yes"' 18126756Smlaier 19126756Smlaiercheck '"$(cat <<\'"$longmark 20126756Smlaier$longmark"' 21126756Smlaierecho yes)" = "yes"' 22126756Smlaier 23126756Smlaiercheck '"$(cat <<'"$longmark 24126756Smlaieryes 25126756Smlaier$longmark"' 26126756Smlaier)" = "yes"' 27126756Smlaier 28126756Smlaiercheck '"$(cat <<\'"$longmark 29126756Smlaieryes 30126756Smlaier$longmark"' 31126756Smlaier)" = "yes"' 32126756Smlaier 33126756Smlaiercheck '"$(cat <<'"$longmark 34126756Smlaier$longmarkstripped 35126756Smlaier$longmark. 36126756Smlaier$longmark"' 37126756Smlaier)" = "'"$longmarkstripped 38126756Smlaier$longmark."'"' 39126756Smlaier 40126756Smlaiercheck '"$(cat <<\'"$longmark 41126756Smlaier$longmarkstripped 42126756Smlaier$longmark. 43126756Smlaier$longmark"' 44126756Smlaier)" = "'"$longmarkstripped 45126756Smlaier$longmark."'"' 46126756Smlaier 47126756Smlaierexit $((failures != 0)) 48126756Smlaier