gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [ascension] branch master updated: test/: change a couple o


From: gnunet
Subject: [GNUnet-SVN] [ascension] branch master updated: test/: change a couple of bashisms.
Date: Thu, 07 Mar 2019 17:59:53 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository ascension.

The following commit(s) were added to refs/heads/master by this push:
     new 99ccc1d  test/: change a couple of bashisms.
99ccc1d is described below

commit 99ccc1d89efe078731fd59175a9eded8df280ca4
Author: ng0 <address@hidden>
AuthorDate: Thu Mar 7 16:57:40 2019 +0000

    test/: change a couple of bashisms.
---
 ascension/test/test_ascension_simple.sh   |  8 ++++----
 ascension/test/test_namestore_multiple.sh | 26 +++++++++++++-------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/ascension/test/test_ascension_simple.sh 
b/ascension/test/test_ascension_simple.sh
index 0c48296..14f96c7 100644
--- a/ascension/test/test_ascension_simple.sh
+++ b/ascension/test/test_ascension_simple.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # Copyright (C) 2019 rexxnor
 # License AGPLv3+: GNU AGPL version 3 or later 
<https://www.gnu.org/licenses/agpl.html>
 # This is free software: you are free to change and redistribute it.
@@ -10,7 +10,7 @@
 
 
 # Shutdown named
-function cleanup {
+cleanup() {
     pkill named
     gnunet-identity -D gnunet
     gnunet-identity -D org
@@ -47,7 +47,7 @@ if [ "$?" -ne 0 ]; then
     exit 1
 fi
 
-function checkfailexp  {
+checkfailexp()  {
     if [ "$?" -ne 0 ]; then
         echo "required record not present"
         cleanup
@@ -55,7 +55,7 @@ function checkfailexp  {
     fi
 }
 
-function checkfailimp  {
+checkfailimp()  {
     if [ "$?" -ne 0 ]; then
         echo "implied record not present"
         cleanup
diff --git a/ascension/test/test_namestore_multiple.sh 
b/ascension/test/test_namestore_multiple.sh
index 9e971cd..f9eeb47 100644
--- a/ascension/test/test_namestore_multiple.sh
+++ b/ascension/test/test_namestore_multiple.sh
@@ -10,19 +10,19 @@ MYEGO=myego
 gnunet-identity -C myego
 
 # HELPERS
-function get_record_type {
+get_record_type() {
     arr=$1
     typ=$(echo -n "${arr[0]}" | cut -d' ' -f2)
     echo "$typ"
 }
 
-function get_value {
+get_value() {
     arr=$1
     val=$(echo -n "${arr[0]}" | cut -d' ' -f4-)
     echo "$val"
 }
 
-function testing {
+testing() {
     label=$1
     records=$2
     recordstring=""
@@ -50,43 +50,43 @@ function testing {
 # TEST CASES
 # 1
 echo "Testing adding of single A record with -R"
-declare -a arr=('1200 A n 127.0.0.1')
+local arr=('1200 A n 127.0.0.1')
 testing test1 "address@hidden"
 # 2
 echo "Testing adding of multiple A records with -R"
-declare -a arr=('1200 A n 127.0.0.1' '2400 A n 127.0.0.2')
+local arr=('1200 A n 127.0.0.1' '2400 A n 127.0.0.2')
 testing test2 "address@hidden"
 # 3
 echo "Testing adding of multiple different records with -R"
-declare -a arr=('1200 A n 127.0.0.1' '2400 AAAA n 2002::')
+local arr=('1200 A n 127.0.0.1' '2400 AAAA n 2002::')
 testing test3 "address@hidden"
 # 4
 echo "Testing adding of single GNS2DNS record with -R"
-declare -a arr=('86400 GNS2DNS n address@hidden')
+local arr=('86400 GNS2DNS n address@hidden')
 testing test4 "address@hidden"
 # 5
 echo "Testing adding of single GNS2DNS shadow record with -R"
-declare -a arr=('86409 GNS2DNS s address@hidden')
+local arr=('86409 GNS2DNS s address@hidden')
 testing test5 "address@hidden"
 # 6
 echo "Testing adding of multiple GNS2DNS record with -R"
-declare -a arr=('1 GNS2DNS n address@hidden' '3600 GNS2DNS s address@hidden')
+local arr=('1 GNS2DNS n address@hidden' '3600 GNS2DNS s address@hidden')
 testing test6 "address@hidden"
 # 7
 echo "Testing adding MX record with -R"
-declare -a arr=('3600 MX n 10,mail')
+local arr=('3600 MX n 10,mail')
 testing test7 "address@hidden"
 # 8
 echo "Testing adding TXT record with -R"
-declare -a arr=('3600 TXT n Pretty_Unicorns')
+local arr=('3600 TXT n Pretty_Unicorns')
 testing test8 "address@hidden"
 # 8
 echo "Testing adding SRV record with -R"
-declare -a arr=('3600 SRV n 0 0 443 testing')
+local arr=('3600 SRV n 0 0 443 testing')
 testing _autodiscover_old._tcp "address@hidden"
 # 9
 echo "Testing adding many A records with -R"
-declare -a arr=('3600 A n 127.0.0.1' '3600 A n 127.0.0.2' '3600 A n 127.0.0.3' 
'3600 A n 127.0.0.4' '3600 A n 127.0.0.5')
+local arr=('3600 A n 127.0.0.1' '3600 A n 127.0.0.2' '3600 A n 127.0.0.3' 
'3600 A n 127.0.0.4' '3600 A n 127.0.0.5')
 testing test9 "address@hidden"
 
 # CLEANUP

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]