mirror of
https://github.com/nushell/nushell.git
synced 2025-07-18 23:24:28 +02:00
`into bits` is a bad name because it is not a traditional type cast to a `bits` type like all the other `into` commands. Instead it is a pretty printer generating `string` type output. Thus the correct bucket is `format` and its subcommands.
14 lines
379 B
Rust
14 lines
379 B
Rust
use nu_test_support::nu;
|
|
|
|
#[test]
|
|
fn byte_stream_into_bits() {
|
|
let result = nu!("[0x[01] 0x[02 03]] | bytes collect | format bits");
|
|
assert_eq!("00000001 00000010 00000011", result.out);
|
|
}
|
|
|
|
#[test]
|
|
fn byte_stream_into_bits_is_stream() {
|
|
let result = nu!("[0x[01] 0x[02 03]] | bytes collect | format bits | describe");
|
|
assert_eq!("string (stream)", result.out);
|
|
}
|