File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 11## Tests that readfile works with the env builtin.
22# RUN: echo -n "hello" > %t.1
3- # RUN: env TEST=%{readfile:%t.1} %python -c "import os; print(os.environ['TEST'])"
3+ # RUN: env TEST=%{readfile:%t.1} %{ python} -c "import os; print(os.environ['TEST'])"
44
55## Fail the test so we can assert on the output.
66# RUN: not echo return
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
1010config.test_format = lit.formats.ShTest(execute_external =not use_lit_shell)
1111config.test_source_root = None
1212config.test_exec_root = None
13+ config.substitutions.append((" %{python}" , ' "%s"' % (sys.executable)))
1314
1415# If we are testing with the external shell, remove the fake-externals from
1516# PATH so that we use mkdir in the tests.
Original file line number Diff line number Diff line change 1212# CHECK: # executed command: echo '%{readfile:[[TEMP_PATH]]{{[\\\/]}}absolute-paths.txt.tmp}'
1313
1414# CHECK-LABEL: FAIL: shtest-readfile :: env.txt ({{[^)]*}})
15- # CHECK: env TEST=hello python3 -c "import os; print(os.environ['TEST'])"
15+ # CHECK: env TEST=hello {{.*}} -c "import os; print(os.environ['TEST'])"
1616# CHECK: # | hello
1717
1818# CHECK-LABEL: FAIL: shtest-readfile :: file-does-not-exist.txt ({{[^)]*}})
You can’t perform that action at this time.
0 commit comments