aboutsummaryrefslogtreecommitdiffhomepage
path: root/output/outputFormat_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-03-24 11:25:25 +0100
committerBjørn Erik Pedersen <[email protected]>2017-03-27 15:43:56 +0200
commit87188496fbb68c39567ec3ee3a55a9305a13e48b (patch)
treeb70e4c3ce41c4d97fe70ce8cb06c4ee0e819084c /output/outputFormat_test.go
parent0c4701f0effbf651891979b925073f6fc5d26a82 (diff)
downloadhugo-87188496fbb68c39567ec3ee3a55a9305a13e48b.tar.gz
hugo-87188496fbb68c39567ec3ee3a55a9305a13e48b.zip
hugolib, output: Handle aliases for all HTML formats
Diffstat (limited to 'output/outputFormat_test.go')
-rw-r--r--output/outputFormat_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/output/outputFormat_test.go b/output/outputFormat_test.go
index a76c50aee..5ef57f975 100644
--- a/output/outputFormat_test.go
+++ b/output/outputFormat_test.go
@@ -26,18 +26,29 @@ func TestDefaultTypes(t *testing.T) {
require.Equal(t, "webcal://", CalendarType.Protocol)
require.Empty(t, CalendarType.Path)
require.True(t, CalendarType.IsPlainText)
+ require.False(t, CalendarType.IsHTML)
require.Equal(t, "HTML", HTMLType.Name)
require.Equal(t, media.HTMLType, HTMLType.MediaType)
require.Empty(t, HTMLType.Path)
require.Empty(t, HTMLType.Protocol) // Will inherit the BaseURL protocol.
require.False(t, HTMLType.IsPlainText)
+ require.True(t, HTMLType.IsHTML)
+
+ require.Equal(t, "AMP", AMPType.Name)
+ require.Equal(t, media.HTMLType, AMPType.MediaType)
+ require.Equal(t, "amp", AMPType.Path)
+ require.Empty(t, AMPType.Protocol) // Will inherit the BaseURL protocol.
+ require.False(t, AMPType.IsPlainText)
+ require.True(t, AMPType.IsHTML)
require.Equal(t, "RSS", RSSType.Name)
require.Equal(t, media.RSSType, RSSType.MediaType)
require.Empty(t, RSSType.Path)
require.False(t, RSSType.IsPlainText)
require.True(t, RSSType.NoUgly)
+ require.False(t, CalendarType.IsHTML)
+
}
func TestGetType(t *testing.T) {