llvm-project/llvm/utils/lit/tests/Inputs/shtest-recursive-substitution
Sergej Jaskiewicz 4dd5c2bee3 [lit] Don't expand escapes until all substitutions have been applied
Otherwise, if a Lit script contains escaped substitutions (like %%p in this test https://github.com/llvm/llvm-project/blob/master/compiler-rt/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cpp#L10), they are unescaped during recursive application of substitutions, and the results are unexpected.

We solve it using the fact that double percent signs are first replaced with #_MARKER_#, and only after all the other substitutions have been applied, #_MARKER_# is replaced with a single percent sign. The only change is that instead of replacing #_MARKER_# at each recursion step, we replace it once after the last recursion step.

Differential Revision: https://reviews.llvm.org/D83894
2020-07-27 18:09:00 +03:00
..
does-not-substitute-no-limit
does-not-substitute-within-limit
escaping [lit] Don't expand escapes until all substitutions have been applied 2020-07-27 18:09:00 +03:00
negative-integer
not-an-integer
set-to-none
substitutes-within-limit