diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2013-10-27 15:18:44 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2013-12-22 17:38:14 +0000 |
commit | aa26e1378803587c24924ad0055318959d597802 (patch) | |
tree | c861dec392e3e14c5e9fee59ea15f5a2d8ee8b4d /test | |
parent | c5430c20d5c3b6fd293b96761ef850d6b301d791 (diff) |
Add ${listextract {n}{list}...}
Diffstat (limited to 'test')
-rw-r--r-- | test/scripts/0000-Basic/0002 | 7 | ||||
-rw-r--r-- | test/stdout/0002 | 7 |
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' |