ref: fd5cf9ac8d9c8587f2ac2f5a58c4b3bcd52f4896
dir: /parser/frontmatter_test.go/
package parser
import (
"testing"
)
func TestFormatToLeadRune(t *testing.T) {
for i, this := range []struct {
kind string
expect rune
}{
{"yaml", '-'},
{"yml", '-'},
{"toml", '+'},
{"json", '{'},
{"js", '{'},
{"unknown", '+'},
} {
result := FormatToLeadRune(this.kind)
if result != this.expect {
t.Errorf("[%d] got %q but expected %q", i, result, this.expect)
}
}
}