6 if ! eval "[ $* ]"; then
12 check '`echo /et[c]/` = "/etc/"'
13 check '`printf /var/empty%s /et[c]/` = "/var/empty/etc/"'
14 check '"`echo /et[c]/`" = "/etc/"'
15 check '`echo "/et[c]/"` = "/etc/"'
16 check '`printf /var/empty%s "/et[c]/"` = "/var/empty/et[c]/"'
17 check '`printf /var/empty/%s \"/et[c]/\"` = "/var/empty/\"/et[c]/\""'
18 check '"`echo \"/et[c]/\"`" = "/et[c]/"'
19 check '"`echo "/et[c]/"`" = "/et[c]/"'
20 check '`echo $$` = $$'
21 check '"`echo $$`" = $$'
22 check '`echo \$\$` = $$'
23 check '"`echo \$\$`" = $$'
25 # Command substitutions consisting of a single builtin may be treated
27 check '`:; echo /et[c]/` = "/etc/"'
28 check '`:; printf /var/empty%s /et[c]/` = "/var/empty/etc/"'
29 check '"`:; echo /et[c]/`" = "/etc/"'
30 check '`:; echo "/et[c]/"` = "/etc/"'
31 check '`:; printf /var/empty%s "/et[c]/"` = "/var/empty/et[c]/"'
32 check '`:; printf /var/empty/%s \"/et[c]/\"` = "/var/empty/\"/et[c]/\""'
33 check '"`:; echo \"/et[c]/\"`" = "/et[c]/"'
34 check '"`:; echo "/et[c]/"`" = "/et[c]/"'
35 check '`:; echo $$` = $$'
36 check '"`:; echo $$`" = $$'
37 check '`:; echo \$\$` = $$'
38 check '"`:; echo \$\$`" = $$'
40 check '`set -f; echo /et[c]/` = "/etc/"'
41 check '"`set -f; echo /et[c]/`" = "/et[c]/"'
43 exit $((failures > 0))