mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:06:03 +02:00
Adds random command with uuid subcommand (#2050)
This commit is contained in:
@ -31,6 +31,7 @@ mod mv;
|
||||
mod open;
|
||||
mod parse;
|
||||
mod prepend;
|
||||
mod random;
|
||||
mod range;
|
||||
mod rename;
|
||||
mod reverse;
|
||||
|
1
crates/nu-cli/tests/commands/random/mod.rs
Normal file
1
crates/nu-cli/tests/commands/random/mod.rs
Normal file
@ -0,0 +1 @@
|
||||
mod uuid;
|
16
crates/nu-cli/tests/commands/random/uuid.rs
Normal file
16
crates/nu-cli/tests/commands/random/uuid.rs
Normal file
@ -0,0 +1,16 @@
|
||||
use nu_test_support::{nu, pipeline};
|
||||
use uuid_crate::Uuid;
|
||||
|
||||
#[test]
|
||||
fn makes_valid_uuid4() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
random uuid
|
||||
"#
|
||||
));
|
||||
|
||||
let result = Uuid::parse_str(actual.out.as_str());
|
||||
|
||||
assert!(result.is_ok());
|
||||
}
|
Reference in New Issue
Block a user