2016-02-17 11:58:18 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -o pipefail
|
|
|
|
set -o errexit
|
|
|
|
set -o nounset
|
|
|
|
# set -o xtrace
|
|
|
|
|
|
|
|
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
2016-12-16 07:18:03 +00:00
|
|
|
__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)"
|
2016-02-17 11:58:18 +00:00
|
|
|
|
|
|
|
bash "${__root}/src/parse_url.sh" 'http://johndoe:abc123@example.com:8080/index.html' pass
|
|
|
|
bash "${__root}/src/parse_url.sh" 'http://johndoe:abc123@example.com:8080/index.html'
|
|
|
|
|
2016-12-16 07:18:03 +00:00
|
|
|
# shellcheck source=src/parse_url.sh
|
|
|
|
source "${__root}/src/parse_url.sh"
|
|
|
|
|
2016-02-17 11:58:18 +00:00
|
|
|
parse_url 'http://johndoe:abc123@example.com:8080/index.html' pass
|
|
|
|
parse_url 'http://johndoe:abc123@example.com:8080/index.html'
|