diff options
Diffstat (limited to 'util/t/uriparse/parse-url')
-rwxr-xr-x | util/t/uriparse/parse-url | 12 |
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" ] + |