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:
smaydew
2020-09-03 13:23:02 -06:00
committed by GitHub
parent 8dc7b8a7cd
commit 1ffbb66e64
7 changed files with 151 additions and 1 deletions

View 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"));
}