forked from extern/nushell
Rename/deprecate into bits
to format bits
(#14634)
# Description `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. # User-Facing Changes `into bits` will raise a `DeprecatedWarning` suggesting the move to `format bits` `into bits` can be removed in `0.103.0` # Tests + Formatting All tests that relied on `into bits` have been updated to `format bits`
This commit is contained in:
committed by
GitHub
parent
4401924128
commit
d36514a323
13
crates/nu-cmd-extra/tests/commands/bits/format.rs
Normal file
13
crates/nu-cmd-extra/tests/commands/bits/format.rs
Normal file
@ -0,0 +1,13 @@
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user