mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
add "into int" behavior (#3279)
* add 'int' command * create `into int` behavior - forcibly overwrote prior implementation ```sh git mv -f crates/nu-command/src/commands/int_.rs crates/nu-command/src/commands/into_int.rs ``` - picked up prior work, polished and renamed Co-authored-by: Saeed Rasooli <saeed.gnu@gmail.com>
This commit is contained in:
@ -5,7 +5,7 @@ fn into_int_filesize() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
into-int 1kb | each {= $it / 1000 }
|
||||
echo 1kb | into int | each {= $it / 1000 }
|
||||
"#
|
||||
));
|
||||
|
||||
@ -17,7 +17,7 @@ fn into_int_filesize2() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
into-int 1kib | each {= $it / 1024 }
|
||||
echo 1kib | into int | each {= $it / 1024 }
|
||||
"#
|
||||
));
|
||||
|
||||
@ -29,7 +29,7 @@ fn into_int_int() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
into-int 1024 | each {= $it / 1024 }
|
||||
echo 1024 | into int | each {= $it / 1024 }
|
||||
"#
|
||||
));
|
||||
|
||||
|
Reference in New Issue
Block a user