From 22c0054c1e992322d76c86755b892702fc9a611f Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 17 Feb 2020 15:31:47 +0100 Subject: [PATCH] Add check to test all fish files with -n This executes `fish --no-execute` a whole bunch of times in order to find syntax errors in our fish scripts. tests/ is exempt because it contains syntax errors on purpose. This is a great idea in principle, but it takes ~4s on my system. --- tests/checks/check-all-fish-files.fish | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/checks/check-all-fish-files.fish diff --git a/tests/checks/check-all-fish-files.fish b/tests/checks/check-all-fish-files.fish new file mode 100644 index 000000000..5d4beb423 --- /dev/null +++ b/tests/checks/check-all-fish-files.fish @@ -0,0 +1,8 @@ +#RUN: %fish -C 'set -l fish %fish' %s +# Test ALL THE FISH FILES +# in share/, that is - the tests are exempt because they contain syntax errors, on purpose + +for file in $__fish_data_dir/**.fish + $fish -n $file +end +# No output is good output