1# Check cases where LIT_OPTS has no effect.
2#
3# RUN:                 %{lit} -j 1 -s %{inputs}/lit-opts | FileCheck %s
4# RUN: env LIT_OPTS=   %{lit} -j 1 -s %{inputs}/lit-opts | FileCheck %s
5# RUN: env LIT_OPTS=-s %{lit} -j 1 -s %{inputs}/lit-opts | FileCheck %s
6
7# Check that LIT_OPTS can override command-line options.
8#
9# RUN: env LIT_OPTS=-a \
10# RUN: %{lit} -j 1 -s %{inputs}/lit-opts \
11# RUN: | FileCheck -check-prefix=SHOW-ALL -DVAR= %s
12
13# Check that LIT_OPTS understands multiple options with arbitrary spacing.
14#
15# RUN: env LIT_OPTS='-a -v  -Dvar=foobar' \
16# RUN: %{lit} -j 1 -s %{inputs}/lit-opts \
17# RUN: | FileCheck -check-prefix=SHOW-ALL -DVAR=foobar %s
18
19# Check that LIT_OPTS parses shell-like quotes and escapes.
20#
21# RUN: env LIT_OPTS='-a   -v -Dvar="foo bar"\ baz' \
22# RUN: %{lit} -j 1 -s %{inputs}/lit-opts \
23# RUN: | FileCheck -check-prefix=SHOW-ALL -DVAR="foo bar baz" %s
24
25# CHECK:      Testing: 1 tests
26# CHECK-NOT:  PASS
27# CHECK:      Passed: 1
28
29# SHOW-ALL:     Testing: 1 tests
30# SHOW-ALL:     PASS: lit-opts :: test.txt (1 of 1)
31# SHOW-ALL:     {{^}}[[VAR]]
32# SHOW-ALL-NOT: PASS
33# SHOW-ALL:     Passed: 1
34