Commit ba1b9ca4 authored by Curtis Blackburn's avatar Curtis Blackburn Committed by Evan Hunt
Browse files

digdelv test fixed for CRLF issue

parent 18e88350
......@@ -76,7 +76,7 @@ if [ -x "$DIG" ] ; then
echo_i "checking dig over TCP works ($n)"
ret=0
dig_with_opts +tcp @10.53.0.3 a a.example > dig.out.test$n || ret=1
grep "10\\.0\\.0\\.1$" < dig.out.test$n > /dev/null || ret=1
tr -d '\r' < dig.out.test$n | grep "10\\.0\\.0\\.1$" > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
......@@ -124,7 +124,7 @@ if [ -x "$DIG" ] ; then
echo_i "checking dig +short +rrcomments works($n)"
ret=0
dig_with_opts +tcp @10.53.0.3 +short +rrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
grep -q "$KEYDATA ; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID\$" < dig.out.test$n || ret=1
tr -d '\r' < dig.out.test$n | grep -q "$KEYDATA ; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID\$" > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
......@@ -158,7 +158,7 @@ if [ -x "$DIG" ] ; then
echo_i "checking dig +short +rrcomments works($n)"
ret=0
dig_with_opts +tcp @10.53.0.3 +short +rrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
grep -q "$KEYDATA ; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID\$" < dig.out.test$n || ret=1
tr -d '\r' < dig.out.test$n | grep -q "$KEYDATA ; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID\$" > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
......@@ -474,7 +474,7 @@ if [ -x "$DIG" ] ; then
n=$((n+1))
echo_i "check that dig processes +ednsopt=key-tag and FORMERR is returned ($n)"
dig_with_opts @10.53.0.3 +ednsopt=key-tag a.example +qr > dig.out.test$n 2>&1 || ret=1
grep "; KEY-TAG$" dig.out.test$n > /dev/null || ret=1
tr -d '\r' < dig.out.test$n | grep "; KEY-TAG$" > /dev/null || ret=1
grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
......@@ -482,7 +482,7 @@ if [ -x "$DIG" ] ; then
n=$((n+1))
echo_i "check that dig processes +ednsopt=key-tag:<value-list> ($n)"
dig_with_opts @10.53.0.3 +ednsopt=key-tag:00010002 a.example +qr > dig.out.test$n 2>&1 || ret=1
grep "; KEY-TAG: 1, 2$" dig.out.test$n > /dev/null || ret=1
tr -d '\r' < dig.out.test$n | grep "; KEY-TAG: 1, 2$" > /dev/null || ret=1
grep "status: FORMERR" dig.out.test$n > /dev/null && ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
......@@ -622,7 +622,7 @@ if [ -x "$DELV" ] ; then
echo_i "checking delv over TCP works ($n)"
ret=0
delv_with_opts +tcp @10.53.0.3 a a.example > delv.out.test$n || ret=1
grep "10\\.0\\.0\\.1$" < delv.out.test$n > /dev/null || ret=1
tr -d '\r' < delv.out.test$n | grep "10\\.0\\.0\\.1$" > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
......@@ -680,7 +680,7 @@ if [ -x "$DELV" ] ; then
echo_i "checking delv +short +nosplit +norrcomments works ($n)"
ret=0
delv_with_opts +tcp @10.53.0.3 +short +nosplit +norrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
grep -q "$NOSPLIT\$" < delv.out.test$n || ret=1
tr -d '\r' < delv.out.test$n | grep -q "$NOSPLIT\$" > /dev/null || ret=1
test "$(wc -l < delv.out.test$n)" -eq 1 || ret=1
test "$(awk '{print NF}' < delv.out.test$n)" -eq 4 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment