summaryrefslogtreecommitdiff
path: root/test/suite-wslua.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/suite-wslua.sh')
-rwxr-xr-xtest/suite-wslua.sh21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/suite-wslua.sh b/test/suite-wslua.sh
index 20b97f96ab..f734f41aea 100755
--- a/test/suite-wslua.sh
+++ b/test/suite-wslua.sh
@@ -196,7 +196,7 @@ wslua_step_args_test() {
test_step_ok
}
-unittests_step_globals_test() {
+wslua_step_globals_test() {
if [ $HAVE_LUA -ne 0 ]; then
test_step_skipped
return
@@ -218,6 +218,22 @@ unittests_step_globals_test() {
test_step_ok
}
+wslua_step_gregex_test() {
+ if [ $HAVE_LUA -ne 0 ]; then
+ test_step_skipped
+ return
+ fi
+
+ # Tshark catches lua script failures, so we have to parse the output.
+ $TSHARK -r $CAPTURE_DIR/empty.pcap -X lua_script:$TESTS_DIR/lua/gregex.lua -X lua_script1:-d$TESTS_DIR/lua/ -X lua_script1:glib -X lua_script1:-V > testout.txt 2>&1
+ if grep -q "All tests passed!" testout.txt; then
+ test_step_ok
+ else
+ cat testout.txt
+ test_step_failed "didn't find pass marker"
+ fi
+}
+
wslua_step_struct_test() {
if [ $HAVE_LUA -ne 0 ]; then
test_step_skipped
@@ -244,7 +260,8 @@ wslua_suite() {
test_step_set_post wslua_cleanup_step
test_step_add "wslua dissector" wslua_step_dissector_test
test_step_add "wslua field/fieldinfo" wslua_step_field_test
- test_step_add "wslua globals" unittests_step_globals_test
+ test_step_add "wslua globals" wslua_step_globals_test
+ test_step_add "wslua gregex" wslua_step_gregex_test
test_step_add "wslua int64" wslua_step_int64_test
test_step_add "wslua listener" wslua_step_listener_test
test_step_add "wslua nstime" wslua_step_nstime_test