summaryrefslogtreecommitdiffstats
path: root/util/t/uriparse
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-09-02 19:34:59 +0200
committermakefu <github@syntax-fehler.de>2013-09-02 19:34:59 +0200
commit4f8ac29f0ca730d48212282605cd61c654a42529 (patch)
tree7b3a6ce5e2d73ce7b495557d0962288047b42770 /util/t/uriparse
parenta3675799d1d9a0e7879071b23f1cc066c709efd0 (diff)
urlparse ->uriparse
Diffstat (limited to 'util/t/uriparse')
-rwxr-xr-xutil/t/uriparse/parse-url12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/t/uriparse/parse-url b/util/t/uriparse/parse-url
new file mode 100755
index 00000000..153afb4a
--- /dev/null
+++ b/util/t/uriparse/parse-url
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -euf
+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" ]
+