]> git.saurik.com Git - apple/shell_cmds.git/blob - sh/tests/parser/heredoc12.0
shell_cmds-198.tar.gz
[apple/shell_cmds.git] / sh / tests / parser / heredoc12.0
1 # $FreeBSD$
2
3 failures=0
4
5 check() {
6 if ! eval "[ $* ]"; then
7 echo "Failed: $*"
8 : $((failures += 1))
9 fi
10 }
11
12 longmark=`printf %01000d 4`
13 longmarkstripped=`printf %0999d 0`
14
15 check '"$(cat <<'"$longmark
16 $longmark"'
17 echo yes)" = "yes"'
18
19 check '"$(cat <<\'"$longmark
20 $longmark"'
21 echo yes)" = "yes"'
22
23 check '"$(cat <<'"$longmark
24 yes
25 $longmark"'
26 )" = "yes"'
27
28 check '"$(cat <<\'"$longmark
29 yes
30 $longmark"'
31 )" = "yes"'
32
33 check '"$(cat <<'"$longmark
34 $longmarkstripped
35 $longmark.
36 $longmark"'
37 )" = "'"$longmarkstripped
38 $longmark."'"'
39
40 check '"$(cat <<\'"$longmark
41 $longmarkstripped
42 $longmark.
43 $longmark"'
44 )" = "'"$longmarkstripped
45 $longmark."'"'
46
47 exit $((failures != 0))