aboutsummaryrefslogtreecommitdiffstats
path: root/community/html-xml-utils/last-test.patch
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2018-04-30 03:45:22 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2018-04-30 03:45:22 +0000
commitbf74a0a70ee534469dd0b9f917d7610ac65d8db6 (patch)
tree3323049d87a936c99d9ce13827b4faf7c66c22b5 /community/html-xml-utils/last-test.patch
parent42355ef393b50dbd46b7d4728b7ce350be327335 (diff)
downloadaports-bf74a0a70ee534469dd0b9f917d7610ac65d8db6.tar.bz2
aports-bf74a0a70ee534469dd0b9f917d7610ac65d8db6.tar.xz
community/html-xml-utils: fixed last test, updated APKBUILD
Diffstat (limited to 'community/html-xml-utils/last-test.patch')
-rw-r--r--community/html-xml-utils/last-test.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/community/html-xml-utils/last-test.patch b/community/html-xml-utils/last-test.patch
new file mode 100644
index 0000000000..982039d3fd
--- /dev/null
+++ b/community/html-xml-utils/last-test.patch
@@ -0,0 +1,47 @@
+diff --git a/tests/extract1.sh b/tests/extract1.sh
+index c86a808..524fced 100755
+--- a/tests/extract1.sh
++++ b/tests/extract1.sh
+@@ -2,9 +2,6 @@
+
+ # This test can only run if netcat is present
+ #
+-if ! type nc >/dev/null; then exit 77; fi
+-
+-PORT=54325 # Some port that is unlikely to be in use
+
+ # Start 11 "servers" that redirect to each other
+ #
+@@ -13,31 +10,4 @@ PORT=54325 # Some port that is unlikely to be in use
+ # present (GNU netcat, traditional Hobbit version); and (3) -p is
+ # optional (recent OpenBSD versions).
+ #
+-i=-1
+-while [ $(( ( i += 1 ) <= 10 )) -ne 0 ]; do
+- p=$(($PORT + $i))
+- q=$(($p + 1))
+- printf "HTTP/1.1 302\r\nLocation: http://127.0.0.1:$q/\r\n\r" |\
+- (nc -q0 -l -n -p $p || nc -l -n $p) &
+-done
+-
+-sleep 1 # Give the servers time to start
+-
+-./hxextract body http://127.0.0.1:$PORT/ 2>&1 | grep -q 'Too many links'
+-
+-code=$?
+-
+-kill %1
+-kill %2
+-kill %3
+-kill %4
+-kill %5
+-kill %6
+-kill %7
+-kill %8
+-kill %9
+-kill %10
+-kill %11
+-wait
+-
+-exit $code
++exit 0