Skip to content

Commit 6722c4b

Browse files
committed
Fixup: Add a regression test
1 parent 45ff976 commit 6722c4b

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import lit.formats
2+
3+
config.name = "shtest-env-path"
4+
config.suffixes = [".txt"]
5+
config.test_format = lit.formats.ShTest()
6+
config.test_source_root = None
7+
config.test_exec_root = None
8+
config.substitutions.append(("%{python}", '"%s"' % (sys.executable)))
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Tests env command for setting the PATH variable.
2+
3+
## Check that test.sh can be found using the configured PATH.
4+
#
5+
# RUN: env PATH=%S test.sh | FileCheck --check-prefix=CHECK %s
6+
#
7+
8+
# CHECK: TEST-ENV-PATH-123
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
echo "TEST-ENV-PATH-123"
4+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Tests env command for setting the PATH variable.
2+
3+
# The test is using /bin/sh. Limit to system known to have /bin/sh.
4+
# REQUIRED: system-linux
5+
6+
# RUN: %{lit} -a -v %{inputs}/shtest-env-path/path.txt \
7+
# RUN: | FileCheck -match-full-lines %s
8+
#
9+
# END.
10+
11+
# CHECK: -- Testing: 1 tests{{.*}}
12+
# CHECK: PASS: shtest-env-path :: path.txt (1 of 1)
13+
# CHECK: --

0 commit comments

Comments
 (0)