nu-command 0.112.2

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_chars_of_specified_length() -> Result {
    let code = "random chars --length 15 | str stats | get chars";
    test().run(code).expect_value_eq(15)
}

#[test]
fn generates_chars_of_specified_filesize() -> Result {
    let code = "random chars --length 1kb | str stats | get bytes";
    test().run(code).expect_value_eq(1000)
}