aboutsummaryrefslogtreecommitdiffstats
path: root/test/test-backend.sh
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-10-08 15:09:59 +0000
committerEvan Huus <eapache@gmail.com>2013-10-08 15:09:59 +0000
commit2553de177d7eb49ac1d4c9b582e1c1a8d9eb4c35 (patch)
treea2299714892d28ebeb371a89cca0cb1f53bf1fab /test/test-backend.sh
parent54c558fdfc63ed9267d1a9557a6bc9ff93d7defa (diff)
From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9245
Fix test suite so that it doesn't attempt to use color if ncurses is not installed. This came up when I attempted to use the test suite under Windows with cygwin installed but not ncurses. The result is not entirely broken but the error messages saying that "tput is not a valid command" make the menus and results difficult to read. svn path=/trunk/; revision=52449
Diffstat (limited to 'test/test-backend.sh')
-rwxr-xr-xtest/test-backend.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test-backend.sh b/test/test-backend.sh
index 1dba9ba4d9..f9173027af 100755
--- a/test/test-backend.sh
+++ b/test/test-backend.sh
@@ -34,6 +34,11 @@
# http://www.tldp.org/LDP/abs/html/options.html
# bash -u test.sh
+# make sure that tput (part of ncurses) is installed
+tput -V >/dev/null 2>/dev/null
+if [ ! $? -eq 0 ]; then
+ USE_COLOR=0
+fi
# coloring the output
if [ $USE_COLOR -eq 1 ] ; then