mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 13:17:36 +02:00
Command tests (#922)
* WIP command tests * Finish marking todo tests * update * update * Windows cd test ignoring
This commit is contained in:
16
crates/nu-command/tests/commands/random/uuid.rs
Normal file
16
crates/nu-command/tests/commands/random/uuid.rs
Normal file
@ -0,0 +1,16 @@
|
||||
use nu_test_support::{nu, pipeline};
|
||||
use uuid_crate::Uuid;
|
||||
|
||||
#[test]
|
||||
fn generates_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