nu-command 0.112.1

Nushell's built-in commands
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use nu_test_support::prelude::*;

#[test]
fn generates_bytes_of_specified_length() -> Result {
    let code = "random binary 16 | bytes length";
    test().run(code).expect_value_eq(16)
}

#[test]
fn generates_bytes_of_specified_filesize() -> Result {
    let code = "random binary 1kb | bytes length";
    test().run(code).expect_value_eq(1000)
}