aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test_util.fish
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-12-23 12:20:44 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-12-23 12:20:44 -0800
commit96589920d5c2080a4c22a518ed4ad82cfc6839f6 (patch)
tree246607844761cf5f66897a148d90f18855873893 /tests/test_util.fish
parent8c17d48c8371604d99ee3836601eb122b88f136f (diff)
Allow running specific high-level tests by passing the name to test.fish
Example: tests/test.fish expansion This will run the tests in expansion.in only
Diffstat (limited to 'tests/test_util.fish')
-rw-r--r--tests/test_util.fish8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_util.fish b/tests/test_util.fish
index 2c64d366..22744b34 100644
--- a/tests/test_util.fish
+++ b/tests/test_util.fish
@@ -8,6 +8,12 @@ if test "$argv[1]" = (status -f)
exit 1
end
+# Any remaining arguments are passed back to test.fish
+set -l args_for_test_script
+if set -q argv[2]
+ set args_for_test_script $argv[2..-1]
+end
+
function die
set -q argv[1]; and echo $argv[1] >&2
exit 1
@@ -51,7 +57,7 @@ if not set -q __fish_is_running_tests
set -lx LC_$var ''
end
set -lx LC_CTYPE en_US.UTF-8
- exec ../fish $script
+ exec ../fish $script $args_for_test_script
die 'exec failed'
else if test "$__fish_is_running_tests" != "$XDG_CONFIG_HOME"
echo 'Something went wrong with the test runner.' >&2