diff options
| author | Alex Flint <[email protected]> | 2021-08-17 12:24:43 -0700 |
|---|---|---|
| committer | Alex Flint <[email protected]> | 2021-08-17 12:24:43 -0700 |
| commit | 9e23a0e262d0bbebfd57c6dc6e34f2f84a37dbd5 (patch) | |
| tree | 9e10da02cd39f085f57f5a1439f27ef7dc72a54f /scalar_test.go | |
| parent | f33108a28e6a688d20eb35a9f081de2c926ad6e5 (diff) | |
add support for url.URL
Diffstat (limited to 'scalar_test.go')
| -rw-r--r-- | scalar_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scalar_test.go b/scalar_test.go index 9a1ef6a..737675a 100644 --- a/scalar_test.go +++ b/scalar_test.go @@ -2,6 +2,7 @@ package scalar import ( "net" + "net/url" "reflect" "testing" "time" @@ -77,6 +78,9 @@ func TestParseValue(t *testing.T) { // MAC addresses assertParse(t, net.HardwareAddr("\x01\x23\x45\x67\x89\xab"), "01:23:45:67:89:ab") + // URL + assertParse(t, url.URL{Scheme: "https", Host: "example.com", Path: "/a/b/c"}, "https://example.com/a/b/c") + // custom text unmarshaler assertParse(t, textUnmarshaler{3}, "abc") } |
