mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
tests/test.fish: Normalize littlecheck output
This prints a green "ok" with the duration, just like the rest of the tests. Note that this clashes a bit with https://github.com/ridiculousfish/littlecheck/pull/3. (also don't check for python again and again and again)
This commit is contained in:
parent
9d5620c170
commit
21667850b3
1 changed files with 10 additions and 2 deletions
|
@ -69,11 +69,19 @@ function test_in_file
|
|||
end
|
||||
end
|
||||
|
||||
set -g python (__fish_anypython)
|
||||
|
||||
function test_littlecheck_file
|
||||
set -l file $argv[1]
|
||||
echo "Testing file $file"
|
||||
set -l python (__fish_anypython)
|
||||
echo -n "Testing file $file ... "
|
||||
set starttime (date +%s)
|
||||
$python ../littlecheck.py -s fish=../test/root/bin/fish $file
|
||||
set -l exit_status $status
|
||||
set -l res ok
|
||||
set test_duration (math (date +%s) - $starttime)
|
||||
if test $exit_status -eq 0
|
||||
say green "ok ($test_duration sec)"
|
||||
end
|
||||
end
|
||||
|
||||
set -l failed
|
||||
|
|
Loading…
Reference in a new issue