summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/scripts/0000-Basic/00027
-rw-r--r--test/stdout/00027
2 files changed, 14 insertions, 0 deletions
diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002
index b924a0934..367d558b3 100644
--- a/test/scripts/0000-Basic/0002
+++ b/test/scripts/0000-Basic/0002
@@ -75,6 +75,13 @@ listcount: ${listcount:}
listcount: ${listcount:<;a;b;c}
listcount: ${listcount:${listnamed:dlist}}
+listextract: ${listextract{ 2}{a:b:c:d}}
+listextract: ${listextract{-2}{<,a,b,c,d}{X${value}X}}
+listextract: ${listextract{ 5}{a:b:c:d}}
+listextract: ${listextract{-5}{a:b:c:d}}
+listextract: ${listextract{ 5}{a:b:c:d}{}{fail}}
+listextract: ${listextract{ 5}{a:b:c:d}{}fail}
+
# Tests with iscntrl() and illegal separators
map: ${map{<\n a\n\nb\nc}{'$item'}}
diff --git a/test/stdout/0002 b/test/stdout/0002
index 1cf6a5b84..e6270977b 100644
--- a/test/stdout/0002
+++ b/test/stdout/0002
@@ -64,6 +64,13 @@
> listcount: 3
> listcount: 2
>
+> listextract: b
+> listextract: XcX
+> listextract:
+> listextract:
+> listextract: fail
+> Failed: "extract" failed and "fail" requested
+>
> # Tests with iscntrl() and illegal separators
>
> map: 'a'