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

Function test_read_sources_crlf

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

Source from the content-addressed store, hash-verified

278
279#[test]
280fn test_read_sources_crlf() -> io::Result<()> {
281 let mut file = NamedTempFile::new()?;
282 write!(
283 file,
284 "junk\r\n# Test: first\r\n\r\n## Source\r\n\r\n```basic\r\nFirst line\r\n\r\nSecond line\r\n```\r\n"
285 )?;
286 file.flush()?;
287
288 assert_eq!(
289 [Test { name: "first".to_owned(), sources: vec!["First line\n\nSecond line".to_owned()] }],
290 read_sources(file.path())?.as_slice()
291 );
292
293 Ok(())
294}
295
296#[test]
297fn test_read_sources_crlf_many_tests() -> io::Result<()> {

Callers

nothing calls this directly

Calls 1

flushMethod · 0.45

Tested by

no test coverage detected