mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:05:47 +02:00
Simplify seq char
(#7054)
* Simplify `seq char` * Fix input/output tests
This commit is contained in:
25
crates/nu-command/tests/commands/seq_char.rs
Normal file
25
crates/nu-command/tests/commands/seq_char.rs
Normal file
@ -0,0 +1,25 @@
|
||||
use nu_test_support::{nu, pipeline};
|
||||
|
||||
#[test]
|
||||
fn fails_when_first_arg_is_multiple_chars() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
seq char aa z
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.err.contains("should be 1 character long"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fails_when_second_arg_is_multiple_chars() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
seq char a zz
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.err.contains("should be 1 character long"));
|
||||
}
|
Reference in New Issue
Block a user