]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: fix for non-ncurses version
authorKarel Zak <kzak@redhat.com>
Thu, 9 Jun 2016 10:10:33 +0000 (12:10 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 9 Jun 2016 10:10:33 +0000 (12:10 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/functions.sh
tests/ts/cal/color
tests/ts/cal/colorw
tests/ts/cal/weekarg

index 19e8a46b8b89137a0346f594dad2474cf419b154..db5f536c652c8d15ef74cd7f8fe7365396b51b69 100644 (file)
@@ -729,3 +729,12 @@ function ts_has_mtab_support {
        fi
 }
 
+function ts_has_ncurses_support {
+       grep -q '#define HAVE_LIBNCURSES' ${top_builddir}/config.h
+       if [ $? == 0 ]; then
+               echo "yes"
+       else
+               echo "no"
+       fi
+}
+
index 00e9c188a9ff7ee2d50a000cda92ea4fdee4dace..8a6dfb69c375bba891cd22f098904ee251efc9f8 100755 (executable)
@@ -22,6 +22,11 @@ ts_init "$*"
 
 ts_check_test_command "$TS_CMD_CAL"
 
+has_ncurses=$( ts_has_ncurses_support )
+if [ "$has_ncurses" != "yes" ]; then
+       ts_skip "without-ncurses"
+fi
+
 # --color output depends on terminal type
 export TERM=linux
 
index 8e8ba0139e7fa37ab265bd1825432abf0a3ae018..493dd2c518647f0ad25b7ff02538f607054b43d0 100755 (executable)
@@ -22,6 +22,11 @@ ts_init "$*"
 
 ts_check_test_command "$TS_CMD_CAL"
 
+has_ncurses=$( ts_has_ncurses_support )
+if [ "$has_ncurses" != "yes" ]; then
+       ts_skip "without-ncurses"
+fi
+
 # --color output depends on terminal type
 export TERM=linux
 
index 19f58c10019af044173e6911e9f50177f4e77232..236baedd52b33c9188eb682809c278903afe5fbe 100755 (executable)
@@ -23,6 +23,11 @@ ts_init "$*"
 
 ts_check_test_command "$TS_CMD_CAL"
 
+has_ncurses=$( ts_has_ncurses_support )
+if [ "$has_ncurses" != "yes" ]; then
+       ts_skip "without-ncurses"
+fi
+
 export TERM=linux
 
 USETERM=$( ts_has_option "useterm" "$*" )