summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tool/generic_erb.rb2
-rwxr-xr-xtool/ifchange2
2 files changed, 2 insertions, 2 deletions
diff --git a/tool/generic_erb.rb b/tool/generic_erb.rb
index ac1ef7d..5d44738 100644
--- a/tool/generic_erb.rb
+++ b/tool/generic_erb.rb
@@ -24,7 +24,7 @@ end
unchanged = "unchanged"
updated = "updated"
if color or (color == nil && STDOUT.tty?)
- if (/\A(?:\e\[.*m|)\z/ =~ IO.popen("tput smso", "r", err: IO::NULL, &:read) rescue nil)
+ if (/\A\e\[.*m\z/ =~ IO.popen("tput smso", "r", err: IO::NULL, &:read) rescue nil)
beg = "\e["
colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:\n]*)/)] : {}
reset = "#{beg}m"
diff --git a/tool/ifchange b/tool/ifchange
index 4164572..7779b28 100755
--- a/tool/ifchange
+++ b/tool/ifchange
@@ -48,7 +48,7 @@ msg_begin= msg_unchanged= msg_updated= msg_reset=
if [ "$color" = always -o \( "$color" = auto -a -t 1 \) ]; then
msg_begin="["
case "`tput smso 2>/dev/null`" in
- "$msg_begin"*m|"")
+ "$msg_begin"*m)
if [ ${TEST_COLORS:+set} ]; then
msg_unchanged=`expr ":$TEST_COLORS:" : ".*:pass=\([^:]*\):"`
msg_updated=`expr ":$TEST_COLORS:" : ".*:fail=\([^:]*\):"`