MCPcopy Index your code
hub / github.com/docker/docker-agent / TestIsTextFile_KnownExtensions

Function TestIsTextFile_KnownExtensions

pkg/chat/chat_test.go:82–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

80}
81
82func 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
102func TestIsTextFile_KnownBinaryExtensions(t *testing.T) {
103 t.Parallel()

Callers

nothing calls this directly

Calls 2

IsTextFileFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected