mirror of
https://github.com/nushell/nushell.git
synced 2024-12-14 03:02:05 +01:00
22 lines
414 B
Rust
22 lines
414 B
Rust
|
use nu_test_support::nu;
|
||
|
|
||
|
#[test]
|
||
|
fn generates_bytes_of_specified_length() {
|
||
|
let actual = nu!(r#"
|
||
|
random binary 16 | bytes length
|
||
|
"#);
|
||
|
|
||
|
let result = actual.out;
|
||
|
assert_eq!(result, "16");
|
||
|
}
|
||
|
|
||
|
#[test]
|
||
|
fn generates_bytes_of_specified_filesize() {
|
||
|
let actual = nu!(r#"
|
||
|
random binary 1kb | bytes length
|
||
|
"#);
|
||
|
|
||
|
let result = actual.out;
|
||
|
assert_eq!(result, "1000");
|
||
|
}
|