summaryrefslogtreecommitdiffstats
path: root/hugolib/shortcode_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-07-02 10:46:28 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-07-04 09:12:44 +0200
commitaa6b1b9be7c9d7322333893b642aaf8c7a5f2c2e (patch)
tree14e3995039a65d7f8e98ff47c6c738b3a7e1684b /hugolib/shortcode_test.go
parenta1d260b41a6673adef679ec4e262c5f390432cf5 (diff)
output: Support templates per site/language
This applies to both regular templates and shortcodes. So, if the site language is French and the output format is AMP, this is the (start) of the lookup order for the home page: 1. index.fr.amp.html 2. index.amp.html 3. index.fr.html 4. index.html 5. ... Fixes #3360
Diffstat (limited to 'hugolib/shortcode_test.go')
-rw-r--r--hugolib/shortcode_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go
index 42da9e465..3d355f947 100644
--- a/hugolib/shortcode_test.go
+++ b/hugolib/shortcode_test.go
@@ -837,8 +837,8 @@ func TestReplaceShortcodeTokens(t *testing.T) {
func TestScKey(t *testing.T) {
require.Equal(t, scKey{Suffix: "xml", ShortcodePlaceholder: "ABCD"},
newScKey(media.XMLType, "ABCD"))
- require.Equal(t, scKey{Suffix: "html", OutputFormat: "AMP", ShortcodePlaceholder: "EFGH"},
- newScKeyFromOutputFormat(output.AMPFormat, "EFGH"))
+ require.Equal(t, scKey{Lang: "en", Suffix: "html", OutputFormat: "AMP", ShortcodePlaceholder: "EFGH"},
+ newScKeyFromLangAndOutputFormat("en", output.AMPFormat, "EFGH"))
require.Equal(t, scKey{Suffix: "html", ShortcodePlaceholder: "IJKL"},
newDefaultScKey("IJKL"))