Add some trailing newline shortcode tests

See #1753
This commit is contained in:
Bjørn Erik Pedersen
2016-01-04 23:48:05 +01:00
parent 7bc5d3663f
commit 9ff36c5a8f
2 changed files with 15 additions and 4 deletions

View File

@@ -95,6 +95,14 @@ func TestHyphenatedSC(t *testing.T) {
CheckShortCodeMatch(t, "{{< hyphenated-video 47238zzb >}}", "Playing Video 47238zzb", tem)
}
// Issue #1753
func TestNoTrailingNewline(t *testing.T) {
tem := tpl.New()
tem.AddInternalShortcode("a.html", `{{ .Get 0 }}`)
CheckShortCodeMatch(t, "ab{{< a c >}}d", "abcd", tem)
}
func TestPositionalParamSC(t *testing.T) {
tem := tpl.New()
tem.AddInternalShortcode("video.html", `Playing Video {{ .Get 0 }}`)