MCPcopy Create free account
hub / github.com/assert-rs/assert_cmd / no_trailing_newline

Function no_trailing_newline

src/output.rs:522–536  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

520
521 #[test]
522 fn no_trailing_newline() {
523 let s = "no\ntrailing\nnewline";
524
525 let mut buf = String::new();
526 super::format_bytes(s.as_bytes(), &mut buf).unwrap();
527
528 assert_eq!(
529 "```
530no
531trailing
532newline```
533",
534 buf
535 );
536 }
537}

Callers

nothing calls this directly

Calls 2

format_bytesFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected