adoc/formatter/text_test.go

30 lines
405 B
Go
Raw Permalink Normal View History

2022-06-11 09:30:22 +02:00
package formatter_test
2022-03-17 16:20:59 +01:00
import (
"strings"
"testing"
2024-09-15 12:07:22 +02:00
"go-mod.ewintr.nl/adoc/formatter"
"go-mod.ewintr.nl/adoc/parser"
"go-mod.ewintr.nl/go-kit/test"
2022-03-17 16:20:59 +01:00
)
func TestText(t *testing.T) {
input := `= A Title
2022-03-22 06:53:01 +01:00
Some document
With some text.`
2022-03-17 16:20:59 +01:00
exp := `A Title
2022-03-22 06:53:01 +01:00
Some document
2022-03-17 16:20:59 +01:00
2022-03-22 06:53:01 +01:00
With some text.
2022-03-17 16:20:59 +01:00
`
doc := parser.New(strings.NewReader(input)).Parse()
2022-06-11 09:30:22 +02:00
test.Equals(t, exp, formatter.NewText().Format(doc))
2022-03-17 16:20:59 +01:00
}