50 lines · python
1## Test the env command (failing tests).2 3# RUN: not %{lit} -v %{inputs}/shtest-env-negative \4# RUN: | FileCheck -match-full-lines %s5#6# END.7 8## Test the env command's expected failures.9 10# CHECK: -- Testing: 7 tests{{.*}}11 12# CHECK: FAIL: shtest-env :: env-calls-cd.txt ({{[^)]*}})13# CHECK: env -u FOO BAR=3 cd foobar14# CHECK: # executed command: env -u FOO BAR=3 cd foobar15# CHECK: # error: command failed with exit status: {{.*}}16 17# CHECK: FAIL: shtest-env :: env-calls-colon.txt ({{[^)]*}})18# CHECK: env -u FOO BAR=3 :19# CHECK: # executed command: env -u FOO BAR=3 :20# CHECK: # error: command failed with exit status: {{.*}}21 22# CHECK: FAIL: shtest-env :: env-calls-echo.txt ({{[^)]*}})23# CHECK: env -u FOO BAR=3 echo hello world24# CHECK: # executed command: env -u FOO BAR=3 echo hello world25# CHECK: # error: command failed with exit status: {{.*}}26 27# CHECK: FAIL: shtest-env :: env-calls-export.txt ({{[^)]*}})28# CHECK: env -u FOO BAR=3 export BAZ=329# CHECK: # executed command: env -u FOO BAR=3 export BAZ=330# CHECK: # error: command failed with exit status: {{.*}}31 32# CHECK: FAIL: shtest-env :: env-calls-mkdir.txt ({{[^)]*}})33# CHECK: env -u FOO BAR=3 mkdir foobar34# CHECK: # executed command: env -u FOO BAR=3 mkdir foobar35# CHECK: # error: command failed with exit status: {{.*}}36 37# CHECK: FAIL: shtest-env :: env-calls-not-builtin.txt ({{[^)]*}})38# CHECK: env -u FOO BAR=3 not rm {{.+}}.no-such-file39# CHECK: # executed command: env -u FOO BAR=3 not rm {{.+}}.no-such-file{{.*}}40# CHECK: # error: command failed with exit status: {{.*}}41 42# CHECK: FAIL: shtest-env :: env-calls-rm.txt ({{[^)]*}})43# CHECK: env -u FOO BAR=3 rm foobar44# CHECK: # executed command: env -u FOO BAR=3 rm foobar45# CHECK: # error: command failed with exit status: {{.*}}46 47# CHECK: Total Discovered Tests: 748# CHECK: Failed: 7 {{\([0-9]*\.[0-9]*%\)}}49# CHECK-NOT: {{.}}50