mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 18:56:51 +08: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
|
@ -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 New Issue
Block a user