mirror of
https://github.com/nushell/nushell.git
synced 2025-05-19 17:30:45 +02:00
17 lines
431 B
Rust
17 lines
431 B
Rust
use nu_test_support::nu;
|
|
|
|
#[test]
|
|
fn timeit_show_stdout() {
|
|
let actual = nu!("let t = timeit { nu --testbin cococo abcdefg }");
|
|
assert_eq!(actual.out, "abcdefg");
|
|
}
|
|
|
|
#[test]
|
|
fn timeit_show_stderr() {
|
|
let actual = nu!(
|
|
" with-env {FOO: bar, FOO2: baz} { let t = timeit { nu --testbin echo_env_mixed out-err FOO FOO2 } }"
|
|
);
|
|
assert!(actual.out.contains("bar"));
|
|
assert!(actual.err.contains("baz"));
|
|
}
|