fix: some bug
This commit is contained in:
@@ -3,8 +3,6 @@ package template_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"fmt"
|
||||
|
||||
"git.max-richter.dev/max/marka/registry"
|
||||
"git.max-richter.dev/max/marka/template"
|
||||
)
|
||||
@@ -67,15 +65,13 @@ func TestExtractBlocks(t *testing.T) {
|
||||
{Type: template.DataBlock, Path: "recipeIngredient", Codec: "list", ListTemplate: "- { . }"},
|
||||
{Type: template.MatchingBlock},
|
||||
{Type: template.DataBlock, Path: "recipeInstructions", Codec: "list", ListTemplate: "{ @index }. { . }"},
|
||||
{Type: template.MatchingBlock},
|
||||
}
|
||||
|
||||
if len(templateBlocks) != len(expected) {
|
||||
t.Fatalf("expected %d blocks, got %d", len(expected), len(templateBlocks))
|
||||
}
|
||||
|
||||
fmt.Printf("%+v\n", templateBlocks[0]);
|
||||
fmt.Printf("Content: %q\n", templateBlocks[0].GetContent());
|
||||
|
||||
for i, b := range templateBlocks {
|
||||
exp := expected[i]
|
||||
if b.Type != exp.Type {
|
||||
|
Reference in New Issue
Block a user