mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Binary into int (#5941)
* Add support for binary to into int * Add test
This commit is contained in:
@ -35,3 +35,15 @@ fn into_int_int() {
|
||||
|
||||
assert!(actual.out.contains('1'));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn into_int_binary() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
echo 0x[01010101] | into int
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.out.contains("16843009"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user