diff options
author | makefu <github@syntax-fehler.de> | 2013-09-02 19:28:00 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2013-09-02 19:28:00 +0200 |
commit | 34d684f27da3500db837d56628fe82e03359278c (patch) | |
tree | f3e933aa835f547b5ef31930d907111d98a2b73a /util/t/urlparse | |
parent | 655ff5e0ec72e4ad021964e6c5d3e8087fe01e6f (diff) |
add urlparse
Diffstat (limited to 'util/t/urlparse')
-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" ] + |