summaryrefslogtreecommitdiffstats
path: root/util/t/uriparse/parse-url
diff options
context:
space:
mode:
Diffstat (limited to 'util/t/uriparse/parse-url')
-rwxr-xr-xutil/t/uriparse/parse-url13
1 files changed, 13 insertions, 0 deletions
diff --git a/util/t/uriparse/parse-url b/util/t/uriparse/parse-url
new file mode 100755
index 00000000..2ccf39c9
--- /dev/null
+++ b/util/t/uriparse/parse-url
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -euf
+tempfile="`mktemp /tmp/test.XXXXXXXX`"
+trap "/bin/rm -f $tempfile" EXIT INT
+
+uriparse "http://user:pass@domain.tld/path" > $tempfile
+. $tempfile
+[ "$HOSTN" = "domain.tld" ] && \
+ [ $USERNAME = "user" ] && \
+ [ $PASSWORD = "pass" ] && \
+ [ $URIPATH = "/path" ]
+
+