(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestDetectLanguagesFromFiles_ManifestSignals(t *testing.T) { |
| 10 | root := t.TempDir() |
| 11 | |
| 12 | mustWriteFile(t, filepath.Join(root, "app.csproj"), "<Project />") |
| 13 | mustWriteFile(t, filepath.Join(root, "build.gradle.kts"), "plugins { kotlin(\"jvm\") }") |
| 14 | mustWriteFile(t, filepath.Join(root, "Podfile"), "platform :ios, '13.0'") |
| 15 | mustWriteFile(t, filepath.Join(root, "tsconfig.json"), "{}") |
| 16 | mustWriteFile(t, filepath.Join(root, "Makefile"), "CC=gcc\nCXX=g++\n") |
| 17 | mustWriteFile(t, filepath.Join(root, "packages", "ui", "package.json"), "{}") |
| 18 | |
| 19 | langs := detectLanguagesFromFiles(root) |
| 20 | |
| 21 | for _, want := range []string{"csharp", "kotlin", "java", "swift", "typescript", "javascript", "c", "cpp"} { |
| 22 | if !langs[want] { |
| 23 | t.Fatalf("expected %q to be detected, got %#v", want, langs) |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | func TestDetectLanguagesFromFiles_SubdirectorySources(t *testing.T) { |
| 29 | root := t.TempDir() |
nothing calls this directly
no test coverage detected