()
| 445 | |
| 446 | #[test] |
| 447 | fn test_line_ending_for_crlf() -> io::Result<()> { |
| 448 | let mut file = NamedTempFile::new()?; |
| 449 | write!(file, "Line 1\r\nLine 2\r\n")?; |
| 450 | file.flush()?; |
| 451 | |
| 452 | assert_eq!("\r\n", line_ending_for(file.path())?); |
| 453 | Ok(()) |
| 454 | } |
| 455 | |
| 456 | /// Rewrites `path` file with to use `line_ending`. |
| 457 | /// |