[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [ascension] 55/57: test/: change a couple of bashisms.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [ascension] 55/57: test/: change a couple of bashisms. |
Date: |
Sat, 13 Apr 2019 13:32:52 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository ascension.
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
- [GNUnet-SVN] [ascension] 31/57: added testing for gnunet -K option and more, (continued)
- [GNUnet-SVN] [ascension] 31/57: added testing for gnunet -K option and more, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 52/57: changed argument -ns to -n, removed gnunet.py, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 46/57: added license headers, GNU coding style guidelines, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 53/57: Add ascension.1, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 34/57: updated gnsmigrator for multiline, added multiline tests, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 41/57: added logic for subzones with zone cut, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 45/57: renamed files, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 48/57: fixed creation zone for non-bailiwick records. bugfixes, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 47/57: updated docstrings, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 43/57: updated dependencies, setup.py, removed TODOs, improved error handling, gnunet, 2019/04/13
- [GNUnet-SVN] [ascension] 55/57: test/: change a couple of bashisms.,
gnunet <=
- [GNUnet-SVN] [ascension] 56/57: ascension.1: As discussed, change license to gnunet eV defaults (FDL+GPL3)., gnunet, 2019/04/13