nushell/crates/nu-command/tests/commands/random/integer.rs

23 lines
415 B
Rust
Raw Normal View History

use nu_test_support::nu;
#[test]
fn generates_an_integer() {
let actual = nu!("random integer 42..43");
assert!(actual.out.contains("42") || actual.out.contains("43"));
}
#[test]
fn generates_55() {
let actual = nu!("random integer 55..55");
assert!(actual.out.contains("55"));
}
#[test]
fn generates_0() {
let actual = nu!("random integer ..<1");
2020-10-08 23:47:51 +02:00
assert!(actual.out.contains('0'));
}