forked from extern/nushell
support filesize arguments in random
binary
/chars
(#14068)
Closes #13920 # User-Facing Changes `random binary` and `random chars` now support filesize arguments: ```nushell random binary 1kb random chars --length 1kb ```
This commit is contained in:
@ -9,3 +9,13 @@ fn generates_chars_of_specified_length() {
|
||||
let result = actual.out;
|
||||
assert_eq!(result, "15");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn generates_chars_of_specified_filesize() {
|
||||
let actual = nu!(r#"
|
||||
random chars --length 1kb | str stats | get bytes
|
||||
"#);
|
||||
|
||||
let result = actual.out;
|
||||
assert_eq!(result, "1000");
|
||||
}
|
||||
|
Reference in New Issue
Block a user