forked from extern/nushell
Simplify seq char
(#7054)
* Simplify `seq char` * Fix input/output tests
This commit is contained in:
@ -67,6 +67,7 @@ mod run_external;
|
||||
mod save;
|
||||
mod select;
|
||||
mod semicolon;
|
||||
mod seq_char;
|
||||
mod shells;
|
||||
mod skip;
|
||||
mod sort_by;
|
||||
|
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