67 lines · plain
1# RUN: echo foo > %t.in2# RUN: echo bar >> %t.in3 4 5# Simple uses of 'not'6 7# RUN: not %{python} fail.py8# RUN: not not %{python} pass.py9# RUN: not not not %{python} fail.py10# RUN: not not not not %{python} pass.py11 12 13# Simple uses of 'not --crash'14 15# RUN: not not --crash %{python} pass.py16# RUN: not not --crash %{python} fail.py17# RUN: not not --crash not %{python} pass.py18# RUN: not not --crash not %{python} fail.py19 20 21# Various patterns of 'not' and 'env'22#23# There's no particular pattern to the 'env' arguments except we try not to24# do the same thing every time.25 26# RUN: env not %{python} fail.py | FileCheck -check-prefixes=FOO-NO,BAR-NO %s27# RUN: not env %{python} fail.py | FileCheck -check-prefixes=FOO-NO,BAR-NO %s28 29# RUN: env FOO=1 not %{python} fail.py \30# RUN: | FileCheck -check-prefixes=FOO1,BAR-NO %s31 32# RUN: not env FOO=1 BAR=1 %{python} fail.py \33# RUN: | FileCheck -check-prefixes=FOO1,BAR1 %s34 35# RUN: env FOO=1 BAR=1 not env -u FOO BAR=2 %{python} fail.py \36# RUN: | FileCheck -check-prefixes=FOO-NO,BAR2 %s37 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 %s40 41# RUN: not not env FOO=1 env FOO=2 BAR=1 %{python} pass.py \42# RUN: | FileCheck -check-prefixes=FOO2,BAR1 %s43 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 %s46 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 %s52 53# RUN: not env FOO=1 BAR=1 not --crash not %{python} pass.py \54# RUN: | FileCheck -check-prefixes=FOO1,BAR1 %s55 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 %s58 59 60# FOO-NO: FOO = [undefined]61# FOO1: FOO = 162# FOO2: FOO = 263 64# BAR-NO: BAR = [undefined]65# BAR1: BAR = 166# BAR2: BAR = 267