• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Check that the config.recursiveExpansionLimit is picked up and will cause
2# lit substitutions to be expanded recursively.
3
4# RUN: %{lit} -j 1 %{inputs}/shtest-recursive-substitution/substitutes-within-limit --show-all | FileCheck --check-prefix=CHECK-TEST1 %s
5# CHECK-TEST1: PASS: substitutes-within-limit :: test.py
6# CHECK-TEST1: $ "echo" "STOP"
7
8# RUN: not %{lit} -j 1 %{inputs}/shtest-recursive-substitution/does-not-substitute-within-limit --show-all | FileCheck --check-prefix=CHECK-TEST2 %s
9# CHECK-TEST2: UNRESOLVED: does-not-substitute-within-limit :: test.py
10# CHECK-TEST2: ValueError: Recursive substitution of
11
12# RUN: %{lit} -j 1 %{inputs}/shtest-recursive-substitution/does-not-substitute-no-limit --show-all | FileCheck --check-prefix=CHECK-TEST3 %s
13# CHECK-TEST3: PASS: does-not-substitute-no-limit :: test.py
14# CHECK-TEST3: $ "echo" "%rec4"
15
16# RUN: not %{lit} -j 1 %{inputs}/shtest-recursive-substitution/not-an-integer --show-all 2>&1 | FileCheck --check-prefix=CHECK-TEST4 %s
17# CHECK-TEST4: recursiveExpansionLimit must be either None or an integer
18
19# RUN: not %{lit} -j 1 %{inputs}/shtest-recursive-substitution/negative-integer --show-all 2>&1 | FileCheck --check-prefix=CHECK-TEST5 %s
20# CHECK-TEST5: recursiveExpansionLimit must be a non-negative integer
21
22# RUN: %{lit} -j 1 %{inputs}/shtest-recursive-substitution/set-to-none --show-all | FileCheck --check-prefix=CHECK-TEST6 %s
23# CHECK-TEST6: PASS: set-to-none :: test.py
24
25# RUN: %{lit} -j 1 %{inputs}/shtest-recursive-substitution/escaping --show-all | FileCheck --check-prefix=CHECK-TEST7 %s
26# CHECK-TEST7: PASS: escaping :: test.py
27# CHECK-TEST7: $ "echo" "%s" "%s" "%%s"
28