From 4015573f5b38bb8550c6b82d376573ea727012eb Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 29 Nov 2023 20:50:01 +0800 Subject: [PATCH] [_] --- sui/core/page_test.go | 24 +++++++++++++++++++++--- sui/core/parser_test.go | 3 +++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/sui/core/page_test.go b/sui/core/page_test.go index 45f18ac0..ad7b9f76 100644 --- a/sui/core/page_test.go +++ b/sui/core/page_test.go @@ -72,9 +72,27 @@ func testPage(t *testing.T) *Page {
{{ idx }} {{ article.title }}
{{ article.desc }}
{{ article.type == "article" ? "article" : "others"}}
-
article
-
image
-
others
+ +
IF
+
+
article
+
image
+
others
+
+ +
Nested
+
+
+ {{ imgIndex }} {{ image }} +
+
+ +
IF
diff --git a/sui/core/parser_test.go b/sui/core/parser_test.go index 61279cec..1727879f 100644 --- a/sui/core/parser_test.go +++ b/sui/core/parser_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/yaoapp/kun/utils" ) func TestRender(t *testing.T) { @@ -29,6 +30,8 @@ func TestRender(t *testing.T) { t.Fatalf("Render error: %v", err) } + utils.Dump(html) + assert.NotEmpty(t, html) assert.Contains(t, html, "hello space") assert.Equal(t, 0, len(parser.errors))