MCPcopy Create free account
hub / github.com/vale-cli/vale / TestFormatFromExt

Function TestFormatFromExt

internal/core/util_test.go:11–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestFormatFromExt(t *testing.T) {
12 extToFormat := map[string][]string{
13 ".py": {".py", "code"},
14 ".cxx": {".cpp", "code"},
15 ".mdown": {".md", "markup"},
16 }
17 m := map[string]string{}
18 for ext, format := range extToFormat {
19 normExt, f := FormatFromExt(ext, m)
20 if format[0] != normExt {
21 t.Errorf("expected = %v, got = %v", format[0], normExt)
22 }
23 if format[1] != f {
24 t.Errorf("expected = %v, got = %v", format[1], f)
25 }
26 }
27}
28
29func TestPrepText(t *testing.T) {
30 rawToPrepped := map[string]string{

Callers

nothing calls this directly

Calls 1

FormatFromExtFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…