Add test for servald non-JNI output delimiter

This commit is contained in:
Andrew Bettison 2012-04-24 17:15:50 +09:30
parent a496919e8a
commit 54b1642bf1
2 changed files with 13 additions and 1 deletions

View File

@ -61,6 +61,7 @@ setup_dna() {
[ "$1" = --no-mkdir ] || mkdir $DNATMP
export SERVALINSTANCE_PATH=$DNATMP
hlr_dat=$SERVALINSTANCE_PATH/hlr.dat
unset SERVALD_OUTPUT_DELIMITER
}
# Utility function for setting up DNA JNI fixtures:

View File

@ -44,11 +44,22 @@ assert_echo_works() {
assertStdoutIs -e 'Hello,\nworld!\n'
}
doc_Echo="Serval echo command works via JNI"
doc_Echo="Serval JNI echo Hello world"
test_Echo() {
executeOk java -classpath "$PWD/classes" org.servalproject.servald.ServalD echo 'Hello,' 'world!'
assertStdoutIs -e 'Hello,\nworld!\n'
}
doc_Delim="Serval non-JNI output delimiter environment variable"
setup_Delim() {
setup_dna
assert_echo_works
}
test_Delim() {
export SERVALD_OUTPUT_DELIMITER=:::
executeOk $dna echo 'Hello,' 'world!'
assertStdoutIs 'Hello,:::world!:::'
}
runTests "$@"