mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 02:09:04 +02:00
Add starts with operator (#5061)
* add starts_with operator * added a test
This commit is contained in:
@ -315,6 +315,14 @@ fn capture_row_condition() -> TestResult {
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn starts_with_operator_succeeds() -> TestResult {
|
||||
run_test(
|
||||
r#"[Moe Larry Curly] | where $it =^ L | str collect"#,
|
||||
"Larry",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn proper_missing_param() -> TestResult {
|
||||
fail_test(r#"def foo [x y z w] { }; foo a b c"#, "missing w")
|
||||
|
Reference in New Issue
Block a user