(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func 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 | |
| 29 | func TestPrepText(t *testing.T) { |
| 30 | rawToPrepped := map[string]string{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…