MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / test_detect_language

Function test_detect_language

crates/opencode-lsp/src/lib.rs:930–937  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

928
929 #[test]
930 fn test_detect_language() {
931 assert_eq!(detect_language(Path::new("main.rs")), "rust");
932 assert_eq!(detect_language(Path::new("index.ts")), "typescript");
933 assert_eq!(detect_language(Path::new("app.tsx")), "typescriptreact");
934 assert_eq!(detect_language(Path::new("main.py")), "python");
935 assert_eq!(detect_language(Path::new("main.go")), "go");
936 assert_eq!(detect_language(Path::new("unknown.xyz")), "plaintext");
937 }
938
939 #[test]
940 fn test_json_rpc_request_serialization() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected