nu-command 0.112.1

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

#[test]
fn generates_an_integer() -> Result {
    let outcome: i64 = test().run("random int 42..43")?;
    assert!(outcome == 42 || outcome == 43);
    Ok(())
}

#[test]
fn generates_55() -> Result {
    test().run("random int 55..55").expect_value_eq(55)
}

#[test]
fn generates_0() -> Result {
    test().run("random int ..<1").expect_value_eq(0)
}