aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test_util.fish
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2014-09-23 22:50:28 -0700
committerGravatar Kevin Ballard <kevin@sb.org>2014-09-23 22:50:28 -0700
commit1563501868d8c2cd4b14ff44b58d6a3e8317a559 (patch)
tree0c263476808f09959a00ecccaa983a3ef7e90ed5 /tests/test_util.fish
parent5f82f721d2bcdf13b04eefc52358c5c6746e4041 (diff)
Fix missing "1 test failed" line
Also tweak colored output to reset before the newline instead of after, so travis behaves better (for some reason reset causes travis to display the line in black).
Diffstat (limited to 'tests/test_util.fish')
-rw-r--r--tests/test_util.fish11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/test_util.fish b/tests/test_util.fish
index b81e17f6..659cbda4 100644
--- a/tests/test_util.fish
+++ b/tests/test_util.fish
@@ -14,14 +14,18 @@ end
function say
set -l color_flags
+ set -l suppress_newline
while set -q argv[1]
switch $argv[1]
case -b -o -u
set color_flags $color_flags $argv[1]
+ case -n
+ set suppress_newline 1
case --
set -e argv[1]
break
case -\*
+ continue
case \*
break
end
@@ -35,10 +39,11 @@ function say
if set_color $color_flags $argv[1]
set -e argv[1]
- echo $argv
- set -l stat $status
+ echo -n $argv
set_color reset
- or return $stat
+ if test -z "$suppress_newline"
+ echo
+ end
end
end