From 0761834cf55accfef52a7a01ed0b7c69ccef09e1 Mon Sep 17 00:00:00 2001
From: "W.C.A. Wijngaards" <wouter@nlnetlabs.nl>
Date: Sat, 30 Nov 2013 12:32:17 +0100
Subject: [PATCH] Fix shell portability, test succeeds on NetBSD.

---
 src/test/testscript.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/test/testscript.sh b/src/test/testscript.sh
index 980a1bd2..bfd7c5de 100755
--- a/src/test/testscript.sh
+++ b/src/test/testscript.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # run $1 > $2 and exit on failure to execute
-function runit {
+runit () {
 	echo -n "Test $1:"
 	./$1 > $2
 	if test $? -ne 0; then
@@ -11,7 +11,7 @@ function runit {
 }
 
 # check output files $1 and $2, exit on failure
-function diffit {
+diffit () {
 	if diff $1 $2; then
 		echo " OK"
 	else
@@ -21,20 +21,20 @@ function diffit {
 }
 
 # check output of program $1, known_good must be in $1.good
-function checkoutput {
+checkoutput () {
 	runit $1 output
 	diffit output $1.good
 }
 
 # filter out TTL and bindata stuff from $1 to $2
-function filterout {
+filterout () {
 	sed -e '/"ttl"/d' -e '/"ipv4_address"/d' -e '/"ipv6_address"/d' -e '/"rdata_raw"/d' -e '/<bindata/d' <$1 >$2
 }
 
 # like checkoutput but removes addresses and TTLs and bindata
 # this makes the test almost useless, but it tests runtime lookup
 # and the structure of the answer format, against the live internet.
-function checkpacket {
+checkpacket () {
 	runit $1 output
 	cp $1.good output.good
 	filterout output output2