2023-07-17 18:43:51 +02:00
|
|
|
use nu_test_support::nu;
|
2022-07-02 16:54:49 +02:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn print_to_stdout() {
|
2023-07-17 18:43:51 +02:00
|
|
|
let actual = nu!("print 'hello world'");
|
2022-07-02 16:54:49 +02:00
|
|
|
assert!(actual.out.contains("hello world"));
|
|
|
|
assert!(actual.err.is_empty());
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn print_to_stderr() {
|
2023-07-17 18:43:51 +02:00
|
|
|
let actual = nu!("print -e 'hello world'");
|
2022-07-02 16:54:49 +02:00
|
|
|
assert!(actual.out.is_empty());
|
|
|
|
assert!(actual.err.contains("hello world"));
|
|
|
|
}
|