summaryrefslogtreecommitdiffstats
path: root/util/t/uriparse/parse-retard-uri
blob: 14aab28eca16128638b62efbf3647d699c235568 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
set -euf
tempfile="`mktemp /tmp/test.XXXXXXXX`"
trap "/bin/rm -f $tempfile" EXIT INT

uriparse "http://'lolwut:\"khan@domain.tld/'''" > $tempfile
. $tempfile
[ $HOSTN == "domain.tld" ] && \
    [ "$USERNAME" == "'lolwut" ] && \
    [ "$PASSWORD" == '"khan' ] && \
    [ "$URIPATH" == "/'''" ]