2020-02-17 14:31:47 +00:00
|
|
|
#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
|
|
|
|
|
2021-03-06 04:40:40 +00:00
|
|
|
set timestamp_file ./last_check_all_files
|
|
|
|
set -l find_args
|
|
|
|
if test -f $timestamp_file
|
|
|
|
set find_args -mnewer $timestamp_file
|
|
|
|
end
|
2021-03-06 04:48:29 +00:00
|
|
|
set -l fail_count 0
|
2021-03-06 04:40:40 +00:00
|
|
|
for file in (find $__fish_data_dir/ -name "*.fish" $find_args)
|
2021-03-06 04:48:29 +00:00
|
|
|
$fish -n $file; or set fail_count (math $fail_count + 1)
|
2020-02-17 14:31:47 +00:00
|
|
|
end
|
2021-03-06 04:48:29 +00:00
|
|
|
|
|
|
|
# Prevent setting timestamp if any errors were encountered
|
|
|
|
if test "$fail_count" -eq 0
|
|
|
|
touch $timestamp_file
|
|
|
|
end
|
|
|
|
|
2020-02-17 14:31:47 +00:00
|
|
|
# No output is good output
|