feat: Test empty port in URI

This commit is contained in:
ge 2022-05-22 01:14:17 +03:00
parent 5c43d3a843
commit d8e7e7718a

View File

@ -184,6 +184,19 @@ setup() {
[ "$fragment" == '' ]
}
@test "rsync://user:password@host:/p/a/th" {
. uri.sh
parse_uri 'rsync://user:password@host:/p/a/th'
[ "$scheme" == 'rsync' ]
[ "$hostname" == 'host' ]
[ "$port" == '' ]
[ "$path" == '/p/a/th' ]
[ "$username" == 'user' ]
[ "$password" == 'password' ]
[ "$query" == '' ]
[ "$fragment" == '' ]
}
@test "rsync://user:password@host:~/backups" {
. uri.sh
parse_uri 'rsync://user:password@host:~/backups'