Add dice subcommand to random command (#2082)

* Add dice subcommand to random command

* Update random dice test name

* Stream results of random dice

* Thanks Clippy!
This commit is contained in:
Joseph T. Lyons
2020-06-30 00:12:51 -04:00
committed by GitHub
parent ed10aafa6f
commit 9876169f5d
7 changed files with 168 additions and 14 deletions

View File

@ -0,0 +1,13 @@
use nu_test_support::{nu, pipeline};
#[test]
fn rolls_4_roll() {
let actual = nu!(
cwd: ".", pipeline(
r#"
random dice -d 4 -s 10 | count
"#
));
assert_eq!(actual.out, "4");
}

View File

@ -1,2 +1,3 @@
mod bool;
mod dice;
mod uuid;