mirror of
https://github.com/nushell/nushell.git
synced 2024-12-27 09:29:14 +01:00
a785e64bc9
- fixed #9156 # Description I'm trying to fix the problems mentioned in the issue. It's my first attempt in Rust. Please let me know if there are any problems. # User-Facing Changes - The `--little-endian` option dropped, replaced with `--endian`. - Add the `--compact` option to the `into binary` command. - `into int` accepts binary input
24 lines
459 B
Rust
24 lines
459 B
Rust
use nu_test_support::{nu, pipeline};
|
|
|
|
#[test]
|
|
fn binary_skip() {
|
|
let actual = nu!(
|
|
cwd: "tests/fixtures/formats", pipeline(
|
|
r#"
|
|
open sample_data.ods --raw |
|
|
skip 2 |
|
|
take 2 |
|
|
into int --endian big
|
|
"#
|
|
));
|
|
|
|
assert_eq!(actual.out, "772");
|
|
}
|
|
|
|
#[test]
|
|
fn fail_on_non_iterator() {
|
|
let actual = nu!("1 | skip 2");
|
|
|
|
assert!(actual.err.contains("command doesn't support"));
|
|
}
|