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

Function test_diff_same

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

Source from the content-addressed store, hash-verified

399
400#[test]
401fn test_diff_same() -> io::Result<()> {
402 let mut f1 = NamedTempFile::new()?;
403 let mut f2 = NamedTempFile::new()?;
404
405 writeln!(f1, "Line 1")?;
406 writeln!(f1, "Line 2")?;
407 f1.flush()?;
408 f1.seek(io::SeekFrom::Start(0))?;
409
410 writeln!(f2, "Line 1")?;
411 writeln!(f2, "Line 2")?;
412 f2.flush()?;
413 f2.seek(io::SeekFrom::Start(0))?;
414
415 let diff = diff(f1.path(), f2.path())?;
416 assert!(diff.is_empty());
417 Ok(())
418}
419
420#[test]
421fn test_diff_different() -> io::Result<()> {

Callers

nothing calls this directly

Calls 2

diffFunction · 0.85
flushMethod · 0.45

Tested by

no test coverage detected