2
0
Fork 0
mirror of https://github.com/nushell/nushell synced 2025-01-29 05:13:31 +00:00
nushell/crates/nu-command/tests/commands/random/decimal.rs
JT c4e1559f89
Another batch of command tests ()
* Add a batch of command tests

* More tests
2022-02-16 07:38:02 -05:00

37 lines
618 B
Rust

use nu_test_support::{nu, pipeline};
#[test]
fn generates_a_decimal() {
let actual = nu!(
cwd: ".", pipeline(
r#"
random decimal 42..43
"#
));
assert!(actual.out.contains("42") || actual.out.contains("43"));
}
#[test]
fn generates_55() {
let actual = nu!(
cwd: ".", pipeline(
r#"
random decimal 55..55
"#
));
assert!(actual.out.contains("55"));
}
#[test]
fn generates_0() {
let actual = nu!(
cwd: ".", pipeline(
r#"
random decimal ..<1
"#
));
assert!(actual.out.contains('0'));
}