mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 11:45:50 +02:00
Initial implementation of random integer subcommand. (#2489)
* Initial implementation of random integer subcommand. * Added additional examples. Co-authored-by: Stacy Maydew <stacy.maydew@starlab.io>
This commit is contained in:
13
crates/nu-cli/tests/commands/random/integer.rs
Normal file
13
crates/nu-cli/tests/commands/random/integer.rs
Normal file
@ -0,0 +1,13 @@
|
||||
use nu_test_support::{nu, pipeline};
|
||||
|
||||
#[test]
|
||||
fn generates_an_integer() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
random integer --min 42 --max 43
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.out.contains("42") || actual.out.contains("43"));
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
mod bool;
|
||||
mod dice;
|
||||
mod integer;
|
||||
#[cfg(feature = "uuid_crate")]
|
||||
mod uuid;
|
||||
|
Reference in New Issue
Block a user