Fix char lsep assignment (#15065)

Fix `char eol` issue where there was still a hardcoded `\n` taking
effect on Windows.
This commit is contained in:
Douglas
2025-02-09 07:19:11 -05:00
committed by GitHub
parent 31e1f49cb6
commit bfe398ca36
2 changed files with 10 additions and 1 deletions

View File

@ -10,3 +10,13 @@ fn test_char_list_outputs_table() {
assert_eq!(actual.out, "113");
}
#[test]
fn test_char_eol() {
let actual = nu!(r#"
let expected = if ($nu.os-info.name == 'windows') { "\r\n" } else { "\n" }
((char lsep) == $expected) and ((char line_sep) == $expected) and ((char eol) == $expected)
"#);
assert_eq!(actual.out, "true");
}