2020-01-16 09:05:53 +00:00
|
|
|
mod commands;
|
|
|
|
|
|
|
|
use nu_test_support::nu;
|
2023-04-08 18:52:37 +00:00
|
|
|
use pretty_assertions::assert_eq;
|
2020-01-16 09:05:53 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn doesnt_break_on_utf8() {
|
2023-07-12 17:07:20 +00:00
|
|
|
let actual = nu!("echo ö");
|
2020-05-07 11:03:43 +00:00
|
|
|
assert_eq!(actual.out, "ö", "'{}' should contain ö", actual.out);
|
2020-01-16 09:05:53 +00:00
|
|
|
}
|
2024-10-02 11:04:18 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn non_zero_exit_code_in_middle_of_pipeline_ignored() {
|
|
|
|
let actual = nu!("nu -c 'print a b; exit 42' | collect");
|
|
|
|
assert_eq!(actual.out, "ab");
|
|
|
|
|
|
|
|
let actual = nu!("nu -c 'print a b; exit 42' | nu --stdin -c 'collect'");
|
|
|
|
assert_eq!(actual.out, "ab");
|
|
|
|
}
|