| 1 |
# RUN: echo foo > %t.in |
| 2 |
# RUN: echo bar >> %t.in |
| 3 |
|
| 4 |
|
| 5 |
# Simple uses of 'not' |
| 6 |
|
| 7 |
# RUN: not %{python} fail.py |
| 8 |
# RUN: not not %{python} pass.py |
| 9 |
# RUN: not not not %{python} fail.py |
| 10 |
# RUN: not not not not %{python} pass.py |
| 11 |
|
| 12 |
|
| 13 |
# Simple uses of 'not --crash' |
| 14 |
|
| 15 |
# RUN: not not --crash %{python} pass.py |
| 16 |
# RUN: not not --crash %{python} fail.py |
| 17 |
# RUN: not not --crash not %{python} pass.py |
| 18 |
# RUN: not not --crash not %{python} fail.py |
| 19 |
|
| 20 |
|
| 21 |
# Various patterns of 'not' and 'env' |
| 22 |
# |
| 23 |
# There's no particular pattern to the 'env' arguments except we try not to |
| 24 |
# do the same thing every time. |
| 25 |
|
| 26 |
# RUN: env not %{python} fail.py | FileCheck -check-prefixes=FOO-NO,BAR-NO %s |
| 27 |
# RUN: not env %{python} fail.py | FileCheck -check-prefixes=FOO-NO,BAR-NO %s |
| 28 |
|
| 29 |
# RUN: env FOO=1 not %{python} fail.py \ |
| 30 |
# RUN: | FileCheck -check-prefixes=FOO1,BAR-NO %s |
| 31 |
|
| 32 |
# RUN: not env FOO=1 BAR=1 %{python} fail.py \ |
| 33 |
# RUN: | FileCheck -check-prefixes=FOO1,BAR1 %s |
| 34 |
|
| 35 |
# RUN: env FOO=1 BAR=1 not env -u FOO BAR=2 %{python} fail.py \ |
| 36 |
# RUN: | FileCheck -check-prefixes=FOO-NO,BAR2 %s |
| 37 |
|
| 38 |
# RUN: not env FOO=1 BAR=1 not env -u FOO -u BAR %{python} pass.py \ |
| 39 |
# RUN: | FileCheck -check-prefixes=FOO-NO,BAR-NO %s |
| 40 |
|
| 41 |
# RUN: not not env FOO=1 env FOO=2 BAR=1 %{python} pass.py \ |
| 42 |
# RUN: | FileCheck -check-prefixes=FOO2,BAR1 %s |
| 43 |
|
| 44 |
# RUN: env FOO=1 -u BAR env -u FOO BAR=1 not not %{python} pass.py \ |
| 45 |
# RUN: | FileCheck -check-prefixes=FOO-NO,BAR1 %s |
| 46 |
|
| 47 |
|
| 48 |
# Various patterns of 'not', 'not --crash', and 'env' |
| 49 |
|
| 50 |
# RUN: not env FOO=1 BAR=1 env FOO=2 BAR=2 not --crash %{python} pass.py \ |
| 51 |
# RUN: | FileCheck -check-prefixes=FOO2,BAR2 %s |
| 52 |
|
| 53 |
# RUN: not env FOO=1 BAR=1 not --crash not %{python} pass.py \ |
| 54 |
# RUN: | FileCheck -check-prefixes=FOO1,BAR1 %s |
| 55 |
|
| 56 |
# RUN: not not --crash env -u BAR not env -u FOO BAR=1 %{python} pass.py \ |
| 57 |
# RUN: | FileCheck -check-prefixes=FOO-NO,BAR1 %s |
| 58 |
|
| 59 |
|
| 60 |
# FOO-NO: FOO = [undefined] |
| 61 |
# FOO1: FOO = 1 |
| 62 |
# FOO2: FOO = 2 |
| 63 |
|
| 64 |
# BAR-NO: BAR = [undefined] |
| 65 |
# BAR1: BAR = 1 |
| 66 |
# BAR2: BAR = 2 |