mirror of
https://github.com/nushell/nushell.git
synced 2024-11-23 08:53:29 +01:00
1ffbb66e64
* Initial implementation of random integer subcommand. * Added additional examples. Co-authored-by: Stacy Maydew <stacy.maydew@starlab.io>
14 lines
268 B
Rust
14 lines
268 B
Rust
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"));
|
|
}
|