aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test.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.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.fish')
-rwxr-xr-x[-rw-r--r--]tests/test.fish15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/test.fish b/tests/test.fish
index 7a48ddbf..994e7a76 100644..100755
--- a/tests/test.fish
+++ b/tests/test.fish
@@ -2,7 +2,18 @@
#
# Fishscript tests
-source test_util.fish (status -f); or exit
+# Change to directory containing this script
+cd (dirname (status -f))
+
+# Test files specified on commandline, or all *.in files
+set -q argv[1]
+if set -q argv[1]
+ set files_to_test $argv.in
+else
+ set files_to_test *.in
+end
+
+source test_util.fish (status -f) $argv; or exit
say -o cyan "Testing high level script functionality"
@@ -46,7 +57,7 @@ function test_file
end
set -l failed
-for i in *.in
+for i in $files_to_test
if not test_file $i
set failed $failed $i
end