From 21667850b36e0512ddcc0b4cfc5c5fc923605c94 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 25 Jun 2019 20:57:37 +0200 Subject: [PATCH] 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) --- tests/test.fish | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test.fish b/tests/test.fish index bc458bd76..82d3739a5 100644 --- a/tests/test.fish +++ b/tests/test.fish @@ -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