MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / parse_fixture

Function parse_fixture

tests/fixture_runner.rs:143–160  ·  view source on GitHub ↗
(content: &str)

Source from the content-addressed store, hash-verified

141}
142
143fn parse_fixture(content: &str) -> Result<ParsedFixture, String> {
144 // Split header and body on the first `---` line.
145 let (header, body) = content
146 .split_once("\n---\n")
147 .or_else(|| content.split_once("\n---"))
148 .ok_or("Fixture missing `---` separator between header and body")?;
149
150 let meta = parse_header(header)?;
151 let (files, cursor_file, cursor_line, cursor_char) = parse_body(body.trim_start())?;
152
153 Ok(ParsedFixture {
154 meta,
155 files,
156 cursor_file,
157 cursor_line,
158 cursor_char,
159 })
160}
161
162fn parse_header(header: &str) -> Result<TestMeta, String> {
163 let mut description = String::new();

Callers 1

run_fixtureFunction · 0.85

Calls 2

parse_headerFunction · 0.85
parse_bodyFunction · 0.85

Tested by

no test coverage detected