ad212c77bf
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.
18 lines
266 B
Rust
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();
|
|
}
|