mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
committed by
Bjørn Erik Pedersen
parent
dc4226a8b2
commit
65deb72dc4
@@ -160,35 +160,6 @@ title: Shorty
|
||||
}
|
||||
}
|
||||
|
||||
func TestShortcodeSpeakerdeck(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for _, this := range []struct {
|
||||
in, expected string
|
||||
}{
|
||||
{
|
||||
`{{< speakerdeck 4e8126e72d853c0060001f97 >}}`,
|
||||
"(?s)<script async class='speakerdeck-embed' data-id='4e8126e72d853c0060001f97'.*?>.*?</script>",
|
||||
},
|
||||
} {
|
||||
|
||||
var (
|
||||
cfg, fs = newTestCfg()
|
||||
th = testHelper{cfg, fs, t}
|
||||
)
|
||||
|
||||
writeSource(t, fs, filepath.Join("content", "simple.md"), fmt.Sprintf(`---
|
||||
title: Shorty
|
||||
---
|
||||
%s`, this.in))
|
||||
writeSource(t, fs, filepath.Join("layouts", "_default", "single.html"), `{{ .Content }}`)
|
||||
|
||||
buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{})
|
||||
|
||||
th.assertFileContentRegexp(filepath.Join("public", "simple", "index.html"), this.expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestShortcodeYoutube(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user