diff --git a/tests/_common b/tests/_common index dda96dca..e02a2372 100755 --- a/tests/_common +++ b/tests/_common @@ -173,3 +173,14 @@ _convert_to_bytes(){ esac echo $bytes } + +_configure_feature(){ + feature=$1 + feature_test=$(cat ../config.log | grep '$ ./configure' | grep $feature) + if [[ "X$feature_test" != "X" ]]; then + #feature enabled + echo 1 + return + fi + echo 0 +} diff --git a/tests/note.test b/tests/note.test index b35fa220..1741d900 100755 --- a/tests/note.test +++ b/tests/note.test @@ -21,6 +21,10 @@ echo -e " $ptlfs -d -s $raw -O $img -F -L $logfile -n note test\n" _ptlbreak $ptlfs -d -s $raw -O $img -F -L $logfile -n "note test" _check_return_code -$ptlfs -d -N -s $raw -O $img -F -L $logfile -n "note test" -_check_return_code + +enable_ncursesw=$(_configure_feature ncursesw) +if [[ $enable_ncursesw == 1 ]]; then + $ptlfs -d -N -s $raw -O $img -F -L $logfile -n "note test" + _check_return_code +fi echo "note test ok"