New contains DSL function (#1374)

* New `contains` DSL function

* unit-test files, and docs
This commit is contained in:
John Kerl 2023-08-27 21:46:24 -04:00 committed by GitHub
parent 5b29169b08
commit 5146dd7f90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 198 additions and 100 deletions

View file

@ -0,0 +1 @@
mlr -n put -q -f ${CASEDIR}/mlr

View file

View file

@ -0,0 +1,8 @@
abc abc true
abc true
true
abc false
abcde abc true
123 3 true
123 34 false
123 23 true

View file

@ -0,0 +1,14 @@
end {
for (e in [
["abc", "abc"],
["abc", ""],
["", ""],
["", "abc"],
["abcde", "abc"],
["123", 3],
[123, 34],
[123, 23],
]) {
print e[1], e[2], contains(e[1], e[2])
}
}