#+test
package markdown
import "core:testing"
@(test)
test_wrap_sections_works :: proc(t: ^testing.T) {
testing.expect_value(
t,
wrap_sections("
intro
Title
body
"),
"",
)
testing.expect_value(
t,
wrap_sections("a
A
b
B
c
"),
"",
)
testing.expect_value(
t,
wrap_sections("Title
body
"),
"",
)
testing.expect_value(
t,
wrap_sections("intro
Title
"),
"",
)
}
@(test)
test_wrap_sections_doesnt_split_content :: proc(t: ^testing.T) {
testing.expect_value(
t,
wrap_sections("just text
"),
"",
)
testing.expect_value(t, wrap_sections(""), "")
testing.expect_value(
t,
wrap_sections("Big
Small
"),
"",
)
}