aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-01-22 17:51:48 -0800
committerGuy Harris <guy@alum.mit.edu>2015-01-23 01:52:24 +0000
commit612e286b9eed3f011a592a206f0128d0b04e5549 (patch)
tree16d24fdafe6d149a7703345d321df5f98c534181 /test
parent5b55288ae3353ff6ad8aa0a14a709299844aaaca (diff)
Fix test script to test Lua Pinfo, and fix problem it found.
The test script was running lua/nstime.lua rather than lua/pinfo.lua for the Pinfo test, and the Pinfo test was testing the ipproto property for a Pinfo, but that was removed. Change-Id: Iccdccd265dd550e41640af3acd607362f1f2f02e Reviewed-on: https://code.wireshark.org/review/6747 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'test')
-rw-r--r--test/lua/pinfo.lua2
-rwxr-xr-xtest/suite-wslua.sh2
2 files changed, 1 insertions, 3 deletions
diff --git a/test/lua/pinfo.lua b/test/lua/pinfo.lua
index f4b922db29..199e9bcaa5 100644
--- a/test/lua/pinfo.lua
+++ b/test/lua/pinfo.lua
@@ -118,7 +118,6 @@ silently accept being set (though nothing happens) Blech!!
test("Pinfo.lo-set-1",not pcall(setPinfo,pinfo,"lo",0))
test("Pinfo.hi-set-1",not pcall(setPinfo,pinfo,"hi",0))
test("Pinfo.port_type-set-1",not pcall(setPinfo,pinfo,"port_type",0))
- test("Pinfo.ipproto-set-1",not pcall(setPinfo,pinfo,"ipproto",0))
test("Pinfo.match-set-1",not pcall(setPinfo,pinfo,"match",0))
test("Pinfo.curr_proto-set-1",not pcall(setPinfo,pinfo,"curr_proto",0))
test("Pinfo.columns-set-1",not pcall(setPinfo,pinfo,"columns",0))
@@ -180,7 +179,6 @@ again, these *should* pass, but Pinfo silently allows it!
test("Pinfo.hi-get-1",tostring(pinfo.hi) == dstip)
test("Pinfo.hi-get-2",typeof(pinfo.hi) == "Address")
test("Pinfo.port_type-get-1",pinfo.port_type == 3)
- test("Pinfo.ipproto-get-1",pinfo.ipproto == 17)
test("Pinfo.match-get-1",pinfo.match == 0)
test("Pinfo.curr_proto-get-1",tostring(pinfo.curr_proto) == "<Missing Protocol Name>")
test("Pinfo.columns-get-1",tostring(pinfo.columns) == "Columns")
diff --git a/test/suite-wslua.sh b/test/suite-wslua.sh
index 9b18de4072..76a6bf3c3d 100755
--- a/test/suite-wslua.sh
+++ b/test/suite-wslua.sh
@@ -257,7 +257,7 @@ wslua_step_pinfo_test() {
fi
# Tshark catches lua script failures, so we have to parse the output.
- $TSHARK -r $CAPTURE_DIR/dhcp.pcap -X lua_script:$TESTS_DIR/lua/nstime.lua > testout.txt 2>&1
+ $TSHARK -r $CAPTURE_DIR/dhcp.pcap -X lua_script:$TESTS_DIR/lua/pinfo.lua > testout.txt 2>&1
if grep -q "All tests passed!" testout.txt; then
test_step_ok
else