just/tests/backticks.rs
Casey Rodarmor ad212c77bf
Fix output \r\n stripping (#2035)
Test if output ends with `\r\n` before `\n`, since the test for `\n` will
succeed if output is terminated with `\r\n`, so `\r\n` is properly stripped
from output text.
2024-05-14 23:30:19 +00:00

18 lines
266 B
Rust

use super::*;
#[test]
fn trailing_newlines_are_stripped() {
Test::new()
.shell(false)
.args(["--evaluate", "foos"])
.justfile(
"
set shell := ['python3', '-c']
foos := `print('foo' * 4)`
",
)
.stdout("foofoofoofoo")
.run();
}