Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Tsai committed Nov 29, 2023
1 parent 766d106 commit 97788ab
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
11 changes: 11 additions & 0 deletions tests/_common
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
8 changes: 6 additions & 2 deletions tests/note.test
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 97788ab

Please sign in to comment.