2023-07-17 18:43:51 +02:00
|
|
|
use nu_test_support::nu;
|
2020-11-24 10:19:48 +01:00
|
|
|
|
|
|
|
#[test]
|
2022-02-16 13:38:02 +01:00
|
|
|
fn generates_a_decimal() {
|
2023-07-17 18:43:51 +02:00
|
|
|
let actual = nu!("random decimal 42..43");
|
2020-11-24 10:19:48 +01:00
|
|
|
|
|
|
|
assert!(actual.out.contains("42") || actual.out.contains("43"));
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn generates_55() {
|
2023-07-17 18:43:51 +02:00
|
|
|
let actual = nu!("random decimal 55..55");
|
2020-11-24 10:19:48 +01:00
|
|
|
|
|
|
|
assert!(actual.out.contains("55"));
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn generates_0() {
|
2023-07-17 18:43:51 +02:00
|
|
|
let actual = nu!(" random decimal ..<1 ");
|
2020-11-24 10:19:48 +01:00
|
|
|
|
|
|
|
assert!(actual.out.contains('0'));
|
|
|
|
}
|