MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_read_sources_one

Function test_read_sources_one

core/tests/testutils/mod.rs:158–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156
157#[test]
158fn test_read_sources_one() -> io::Result<()> {
159 let mut file = NamedTempFile::new()?;
160 write!(
161 file,
162 "junk
163# Test: first
164
165## Source
166
167```basic
168First line
169
170Second line
171```
172
173## Disassembly
174
175```asm
176foo bar
177```
178"
179 )?;
180 file.flush()?;
181
182 assert_eq!(
183 [Test { name: "first".to_owned(), sources: vec!["First line\n\nSecond line".to_owned()] }],
184 read_sources(file.path())?.as_slice()
185 );
186
187 Ok(())
188}
189
190#[test]
191fn test_read_sources_two() -> io::Result<()> {

Callers

nothing calls this directly

Calls 1

flushMethod · 0.45

Tested by

no test coverage detected