mirror of
https://github.com/nushell/nushell.git
synced 2024-12-29 02:19:44 +01:00
26 lines
419 B
Rust
26 lines
419 B
Rust
use nu_test_support::{nu, pipeline};
|
|
|
|
#[test]
|
|
fn into_int_filesize() {
|
|
let actual = nu!(
|
|
cwd: ".", pipeline(
|
|
r#"
|
|
into-int 1kb | = $it / 1024
|
|
"#
|
|
));
|
|
|
|
assert!(actual.out.contains('1'));
|
|
}
|
|
|
|
#[test]
|
|
fn into_int_int() {
|
|
let actual = nu!(
|
|
cwd: ".", pipeline(
|
|
r#"
|
|
into-int 1024 | = $it / 1024
|
|
"#
|
|
));
|
|
|
|
assert!(actual.out.contains('1'));
|
|
}
|