1## Test the env command (failing tests). 2 3# RUN: not %{lit} -a -v %{inputs}/shtest-env-negative \ 4# RUN: | FileCheck -match-full-lines %s 5# 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 foobar 14# CHECK: # executed command: env -u FOO BAR=3 cd foobar 15# 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 world 24# CHECK: # executed command: env -u FOO BAR=3 echo hello world 25# 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=3 29# CHECK: # executed command: env -u FOO BAR=3 export BAZ=3 30# 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 foobar 34# CHECK: # executed command: env -u FOO BAR=3 mkdir foobar 35# 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-file 39# 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 foobar 44# CHECK: # executed command: env -u FOO BAR=3 rm foobar 45# CHECK: # error: command failed with exit status: {{.*}} 46 47# CHECK: Total Discovered Tests: 7 48# CHECK: Failed: 7 {{\([0-9]*\.[0-9]*%\)}} 49# CHECK-NOT: {{.}} 50