aboutsummaryrefslogtreecommitdiff
path: root/markdown/ast_modifier_test.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-12-20 18:24:09 +0100
committerAnhgelus Morhtuuzh <william@herges.fr>2025-12-20 18:24:09 +0100
commit73c4a664b03f8afa8edb527fb6a8cc310bdb3380 (patch)
tree9ba2d2af2149024ea0dc05a88dfcecb351c90139 /markdown/ast_modifier_test.go
parent90246ee314cfbb6b6f0b43b51e392b6b5293b867 (diff)
test(markdown): use subtest to clean
Diffstat (limited to 'markdown/ast_modifier_test.go')
-rw-r--r--markdown/ast_modifier_test.go19
1 files changed, 3 insertions, 16 deletions
diff --git a/markdown/ast_modifier_test.go b/markdown/ast_modifier_test.go
index 3689657..acb9f40 100644
--- a/markdown/ast_modifier_test.go
+++ b/markdown/ast_modifier_test.go
@@ -3,20 +3,7 @@ package markdown
import "testing"
func TestModifier(t *testing.T) {
- content := `
-**bo*n*soir**, ça ***va* bien** ?
-`
- lxs := lex(content, new(Option))
- tree, err := ast(lxs)
- if err != nil {
- t.Fatal(err)
- }
- c, err := tree.Eval(nil)
- if err != nil {
- t.Fatal(err)
- }
- if c != "<p><b>bo<em>n</em>soir</b>, ça <b><em>va</em> bien</b> ?</p>" {
- t.Errorf("failed, got %s", c)
- t.Logf("lxs: %s\ntree: %s", lxs, tree)
- }
+ t.Run("modifiers", func(t *testing.T) {
+ t.Run("combo", test(`**bo*n*soir**, ça ***va* bien** ?`, `<p><b>bo<em>n</em>soir</b>, ça <b><em>va</em> bien</b> ?</p>`))
+ })
}