diff options
Diffstat (limited to '')
-rw-r--r-- | bin/1sh/tests/parser/heredoc12.0 | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/bin/1sh/tests/parser/heredoc12.0 b/bin/1sh/tests/parser/heredoc12.0 new file mode 100644 index 00000000..6a5eefdc --- /dev/null +++ b/bin/1sh/tests/parser/heredoc12.0 @@ -0,0 +1,47 @@ +# $FreeBSD: releng/12.1/bin/sh/tests/parser/heredoc12.0 271593 2014-09-14 16:46:30Z jilles $ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +longmark=`printf %01000d 4` +longmarkstripped=`printf %0999d 0` + +check '"$(cat <<'"$longmark +$longmark"' +echo yes)" = "yes"' + +check '"$(cat <<\'"$longmark +$longmark"' +echo yes)" = "yes"' + +check '"$(cat <<'"$longmark +yes +$longmark"' +)" = "yes"' + +check '"$(cat <<\'"$longmark +yes +$longmark"' +)" = "yes"' + +check '"$(cat <<'"$longmark +$longmarkstripped +$longmark. +$longmark"' +)" = "'"$longmarkstripped +$longmark."'"' + +check '"$(cat <<\'"$longmark +$longmarkstripped +$longmark. +$longmark"' +)" = "'"$longmarkstripped +$longmark."'"' + +exit $((failures != 0)) |