2020-01-16 10:05:53 +01:00
|
|
|
mod commands;
|
|
|
|
|
|
|
|
use nu_test_support::nu;
|
2023-04-08 20:52:37 +02:00
|
|
|
use pretty_assertions::assert_eq;
|
2020-01-16 10:05:53 +01:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn doesnt_break_on_utf8() {
|
2023-07-12 19:07:20 +02:00
|
|
|
let actual = nu!("echo ö");
|
2020-05-07 13:03:43 +02:00
|
|
|
assert_eq!(actual.out, "ö", "'{}' should contain ö", actual.out);
|
2020-01-16 10:05:53 +01:00
|
|
|
}
|
2024-10-02 13:04:18 +02: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");
|
|
|
|
}
|