aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/function/string/testscript2
-rw-r--r--tests/test/script/runner/for.testscript13
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/function/string/testscript b/tests/function/string/testscript
index 8eb5760..57f30e2 100644
--- a/tests/function/string/testscript
+++ b/tests/function/string/testscript
@@ -47,6 +47,7 @@
{
$* <'print $string.contains(abcdabcd, da, once)' >'true' : true
$* <'print $string.contains(abcdabcd, bc, once)' >'false' : false
+ $* <'print $string.contains(abcdefgh, ab, once)' >'true' : true-begin
}
}
@@ -76,6 +77,7 @@
{
$* <'print $string.ends_with( abcd, cd)' >'true' : true
$* <'print $string.ends_with( abcd, bc)' >'false' : false
+ $* <'print $string.ends_with( abcd, xxxx)' >'false' : false-equal-size
$* <'print $ends_with([string] abcd, abcd)' >'true' : typed
}
diff --git a/tests/test/script/runner/for.testscript b/tests/test/script/runner/for.testscript
index f43fcc2..0ca67c3 100644
--- a/tests/test/script/runner/for.testscript
+++ b/tests/test/script/runner/for.testscript
@@ -30,6 +30,19 @@
%.+ -b%
EOO
+ : custom-iteration
+ :
+ $c <<EOI && $b >>EOO
+ j = $json.parse('[1, 2, 3]')
+ for e: $j
+ echo $e >|
+ end
+ EOI
+ 1
+ 2
+ 3
+ EOO
+
: special-var
:
$c <<EOI && $b 2>>EOE != 0