tpl: Make getJSON/getCVS accept non-string args

This broke for the Twitter simple shortcode now that Shortcodes accepts typed arguments.

Fixes #6382
This commit is contained in:
Bjørn Erik Pedersen
2019-10-10 10:18:30 +02:00
parent 71b18a0786
commit 0d7b05be4c
4 changed files with 40 additions and 6 deletions

View File

@@ -753,7 +753,11 @@ func (th testHelper) assertFileContentRegexp(filename string, matches ...string)
for _, match := range matches {
match = th.replaceDefaultContentLanguageValue(match)
r := regexp.MustCompile(match)
th.Assert(r.MatchString(content), qt.Equals, true)
matches := r.MatchString(content)
if !matches {
fmt.Println(content)
}
th.Assert(matches, qt.Equals, true)
}
}