mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:55:40 +02:00
Command tests (#922)
* WIP command tests * Finish marking todo tests * update * update * Windows cd test ignoring
This commit is contained in:
43
crates/nu-command/tests/commands/random/decimal.rs
Normal file
43
crates/nu-command/tests/commands/random/decimal.rs
Normal file
@ -0,0 +1,43 @@
|
||||
use nu_test_support::{nu, pipeline};
|
||||
|
||||
// FIXME: jt: needs more work
|
||||
#[ignore]
|
||||
#[test]
|
||||
fn generates_an_decimal() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
random decimal 42..43
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.out.contains("42") || actual.out.contains("43"));
|
||||
}
|
||||
|
||||
// FIXME: jt: needs more work
|
||||
#[ignore]
|
||||
#[test]
|
||||
fn generates_55() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
random decimal 55..55
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.out.contains("55"));
|
||||
}
|
||||
|
||||
// FIXME: jt: needs more work
|
||||
#[ignore]
|
||||
#[test]
|
||||
fn generates_0() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
random decimal ..<1
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.out.contains('0'));
|
||||
}
|
Reference in New Issue
Block a user