summaryrefslogtreecommitdiffstats
path: root/util/t/urlparse/parse-url
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-09-02 19:28:00 +0200
committermakefu <github@syntax-fehler.de>2013-09-02 19:28:00 +0200
commit34d684f27da3500db837d56628fe82e03359278c (patch)
treef3e933aa835f547b5ef31930d907111d98a2b73a /util/t/urlparse/parse-url
parent655ff5e0ec72e4ad021964e6c5d3e8087fe01e6f (diff)
add urlparse
Diffstat (limited to 'util/t/urlparse/parse-url')
-rwxr-xr-xutil/t/urlparse/parse-url12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/t/urlparse/parse-url b/util/t/urlparse/parse-url
new file mode 100755
index 00000000..b9f0aa31
--- /dev/null
+++ b/util/t/urlparse/parse-url
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -xeuf
+tempfile="`mktemp /tmp/test.XXXXXXXX`"
+trap "/bin/rm -f $tempfile" EXIT INT
+
+urlparse "http://user:pass@domain.tld/path" > $tempfile
+. $tempfile
+[ $HOSTNAME == "domain.tld" ] && \
+ [ $USERNAME == "user" ] && \
+ [ $PASSWORD == "pass" ] && \
+ [ $URIPATH == "/path" ]
+