in/not-in for strings (#3906)

This commit is contained in:
JT
2021-08-07 09:49:37 +12:00
committed by GitHub
parent cd814851da
commit b6728efcd4
3 changed files with 37 additions and 7 deletions

View File

@ -679,6 +679,31 @@ fn negative_decimal_start() {
assert_eq!(actual.out, "2.7");
}
#[test]
fn string_inside_of() {
let actual = nu!(
cwd: ".",
r#"
"bob" in "bobby"
"#
);
assert_eq!(actual.out, "true");
}
#[test]
fn string_not_inside_of() {
let actual = nu!(
cwd: ".",
r#"
"bob" not-in "bobby"
"#
);
assert_eq!(actual.out, "false");
}
#[test]
fn index_row() {
let actual = nu!(