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

Function line_ending_for

core/tests/testutils/mod.rs:441–444  ·  view source on GitHub ↗

Obtains the line ending used in `golden` file.

(golden: &Path)

Source from the content-addressed store, hash-verified

439
440/// Obtains the line ending used in `golden` file.
441fn line_ending_for(golden: &Path) -> io::Result<&'static str> {
442 let text = fs::read_to_string(golden)?;
443 if text.contains("\r\n") { Ok("\r\n") } else { Ok("\n") }
444}
445
446#[test]
447fn test_line_ending_for_crlf() -> io::Result<()> {

Callers 1

run_one_testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected