mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-10 03:28:03 +00:00
24 lines
767 B
TypeScript
24 lines
767 B
TypeScript
import { inspectTreeStructure, testParseSourceCodeDefinitions } from "./helpers"
|
|
import { cQuery } from "../queries"
|
|
import sampleCContent from "./fixtures/sample-c"
|
|
|
|
describe("inspectC", () => {
|
|
const testOptions = {
|
|
language: "c",
|
|
wasmFile: "tree-sitter-c.wasm",
|
|
queryString: cQuery,
|
|
extKey: "c",
|
|
}
|
|
|
|
it("should inspect C tree structure", async () => {
|
|
await inspectTreeStructure(sampleCContent, "c")
|
|
})
|
|
|
|
it("should parse C definitions", async () => {
|
|
const result = await testParseSourceCodeDefinitions("test.c", sampleCContent, testOptions)
|
|
// Only verify that parsing produces output with line numbers and content
|
|
if (!result || !result.match(/\d+--\d+ \|/)) {
|
|
throw new Error("Failed to parse C definitions with line numbers")
|
|
}
|
|
})
|
|
})
|