mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
Add test for servald non-JNI output delimiter
This commit is contained in:
parent
a496919e8a
commit
54b1642bf1
@ -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:
|
||||
|
@ -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 "$@"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user