(t *testing.T)
| 80 | } |
| 81 | |
| 82 | func TestIsTextFile_KnownExtensions(t *testing.T) { |
| 83 | t.Parallel() |
| 84 | textFiles := []string{ |
| 85 | "main.go", "script.py", "app.ts", "lib.rs", "Main.java", |
| 86 | "readme.md", "doc.txt", "data.json", "config.yaml", |
| 87 | "style.css", "page.html", "query.sql", "script.sh", |
| 88 | "config.toml", "schema.xml", "data.csv", "notes.org", |
| 89 | "code.cpp", "header.h", "module.ex", "func.hs", |
| 90 | "app.swift", "code.kt", "app.dart", "code.zig", |
| 91 | ".gitignore", "Makefile.mk", "query.graphql", |
| 92 | } |
| 93 | |
| 94 | for _, f := range textFiles { |
| 95 | t.Run(f, func(t *testing.T) { |
| 96 | t.Parallel() |
| 97 | assert.True(t, IsTextFile(f), "expected %s to be detected as text", f) |
| 98 | }) |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | func TestIsTextFile_KnownBinaryExtensions(t *testing.T) { |
| 103 | t.Parallel() |
nothing calls this directly
no test coverage detected