diff options
Diffstat (limited to 'transform/livereloadinject/livereloadinject_test.go')
-rw-r--r-- | transform/livereloadinject/livereloadinject_test.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/transform/livereloadinject/livereloadinject_test.go b/transform/livereloadinject/livereloadinject_test.go index b2ec4483a..d5cee79f8 100644 --- a/transform/livereloadinject/livereloadinject_test.go +++ b/transform/livereloadinject/livereloadinject_test.go @@ -58,7 +58,15 @@ func TestLiveReloadInject(t *testing.T) { c.Assert(apply("foo</BODY>"), qt.Equals, "foo"+expectBase+"</BODY>") }) + c.Run("Html upper", func(c *qt.C) { + c.Assert(apply("<html>foo"), qt.Equals, "<html>"+expectBase+warnScript+"foo") + }) + + c.Run("Html upper with attr", func(c *qt.C) { + c.Assert(apply(`<html lang="en">foo`), qt.Equals, `<html lang="en">`+expectBase+warnScript+"foo") + }) + c.Run("No match", func(c *qt.C) { - c.Assert(apply("<h1>No match</h1>"), qt.Equals, "<h1>No match</h1>") + c.Assert(apply("<h1>No match</h1>"), qt.Equals, "<h1>No match</h1>"+expectBase+warnScript) }) } |