mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
all: Propagate baseURL error to the callers
This commit is contained in:
@@ -48,4 +48,14 @@ func TestBaseURL(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "webcal://hugo@rules.com", p)
|
||||
|
||||
// Test with "non-URLs". Some people will try to use these as a way to get
|
||||
// relative URLs working etc.
|
||||
b, err = newBaseURLFromString("/")
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "/", b.String())
|
||||
|
||||
b, err = newBaseURLFromString("")
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "", b.String())
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user