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