aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-05-11 18:57:08 +0000
committerBill Meier <wmeier@newsguy.com>2009-05-11 18:57:08 +0000
commitf471a317dc69396a27040f78fade60b0bbabcb17 (patch)
tree333979d9521573dae35b04667a8a237b5862655b /test
parentec71e49011eff3d9c6053d95f61fdee7540e5b8b (diff)
test.sh: revise tests to handle revised capinfos output.
svn path=/trunk/; revision=28332
Diffstat (limited to 'test')
-rwxr-xr-xtest/suite-capture.sh12
-rwxr-xr-xtest/suite-io.sh6
2 files changed, 9 insertions, 9 deletions
diff --git a/test/suite-capture.sh b/test/suite-capture.sh
index 4cb622bf82..4033cb879c 100755
--- a/test/suite-capture.sh
+++ b/test/suite-capture.sh
@@ -106,7 +106,7 @@ capture_step_10packets() {
# ok, we got a capture file, does it contain exactly 10 packets?
$CAPINFOS ./testout.pcap > ./testout2.txt
- grep -i 'Number of packets: 10' ./testout2.txt > /dev/null
+ grep -Ei 'Number of packets:[[:blank:]]+10' ./testout2.txt > /dev/null
if [ $? -eq 0 ]; then
test_step_ok
else
@@ -154,7 +154,7 @@ capture_step_10packets_stdout() {
# ok, we got a capture file, does it contain exactly 10 packets?
$CAPINFOS ./testout.pcap > ./testout2.txt 2>&1
- grep -i 'Number of packets: 10' ./testout2.txt > /dev/null
+ grep -Ei 'Number of packets:[[:blank:]]+10' ./testout2.txt > /dev/null
if [ $? -eq 0 ]; then
test_step_ok
else
@@ -189,7 +189,7 @@ capture_step_fifo() {
# ok, we got a capture file, does it contain exactly 8 packets?
$CAPINFOS ./testout.pcap > ./testout.txt
- grep -i 'Number of packets: 8' ./testout.txt > /dev/null
+ grep -Ei 'Number of packets:[[:blank:]]+8' ./testout.txt > /dev/null
if [ $? -eq 0 ]; then
test_step_ok
else
@@ -236,7 +236,7 @@ capture_step_2multi_10packets() {
# ok, we got a capture file, does it contain exactly 10 packets?
$CAPINFOS ./testout.pcap > ./testout.txt
- grep -i 'Number of packets: 10' ./testout.txt > /dev/null
+ grep -Ei 'Number of packets:[[:blank:]]+10' ./testout.txt > /dev/null
if [ $? -eq 0 ]; then
test_step_ok
else
@@ -284,7 +284,7 @@ capture_step_read_filter() {
# ok, we got a capture file, does it contain exactly 0 packets?
$CAPINFOS ./testout.pcap > ./testout.txt
- grep -i 'Number of packets: 0' ./testout.txt > /dev/null
+ grep -Ei 'Number of packets:[[:blank:]]+0' ./testout.txt > /dev/null
if [ $? -eq 0 ]; then
test_step_ok
else
@@ -336,7 +336,7 @@ capture_step_snapshot() {
# ok, we got a capture file, does it contain exactly 0 packets?
$CAPINFOS ./testout2.pcap > ./testout.txt
- grep -i 'Number of packets: 0' ./testout.txt > /dev/null
+ grep -Ei 'Number of packets:[[:blank:]]+0' ./testout.txt > /dev/null
if [ $? -eq 0 ]; then
test_step_ok
else
diff --git a/test/suite-io.sh b/test/suite-io.sh
index 909cff804e..51d4f0135b 100755
--- a/test/suite-io.sh
+++ b/test/suite-io.sh
@@ -50,7 +50,7 @@ io_step_input_file() {
# ok, we got a capture file, does it contain exactly 10 packets?
$CAPINFOS ./testout.pcap > ./testout.txt
- grep -i 'Number of packets: 4' ./testout.txt > /dev/null
+ grep -Ei 'Number of packets:[[:blank:]]+4' ./testout.txt > /dev/null
if [ $? -eq 0 ]; then
test_step_ok
else
@@ -81,7 +81,7 @@ io_step_output_piping() {
# ok, we got a capture file, does it contain exactly 10 packets?
$CAPINFOS ./testout.pcap > ./testout2.txt 2>&1
- grep -i 'Number of packets: 4' ./testout2.txt > /dev/null
+ grep -Ei 'Number of packets:[[:blank:]]+4' ./testout2.txt > /dev/null
if [ $? -eq 0 ]; then
test_step_ok
else
@@ -113,7 +113,7 @@ io_step_input_piping() {
# ok, we got a capture file, does it contain exactly 10 packets?
$CAPINFOS ./testout.pcap > ./testout2.txt 2>&1
- grep -i 'Number of packets: 4' ./testout2.txt > /dev/null
+ grep -Ei 'Number of packets:[[:blank:]]+4' ./testout2.txt > /dev/null
if [ $? -eq 0 ]; then
test_step_ok
else