From ac4ef9bdcad6bb41c919f6d0b76fdef717ab5e18 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 6 Sep 2014 21:10:17 +0100 Subject: Add expansion item for sorting lists --- test/scripts/0000-Basic/0002 | 7 +++++++ test/stdout/0002 | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'test') diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002 index 51dc6ae48..bcfacdea4 100644 --- a/test/scripts/0000-Basic/0002 +++ b/test/scripts/0000-Basic/0002 @@ -82,6 +82,13 @@ listextract: ${listextract{-5}{a:b:c:d}} listextract: ${listextract{ 5}{a:b:c:d}{}{fail}} listextract: ${listextract{ 5}{a:b:c:d}{}fail} +sort: ${sort{3:2:1:4}{<}{$item}} +sort: ${sort {<, 3,2,1,4}{>}{$item}} +sort: ${sort{c:B:a:aa}{lti}{$item}} +sort: ${sort{666 r99.ex.com:10 smtp.ex.com:100 r2.ex.com}{<}{${sg {$item}{([0-9]*).*\$}{\$1}}}} +sort: ${sort{666,r99.ex.com:10,smtp.ex.com:100,r2.ex.com}{<}{${listextract{1}{<,$item}}}} +sort: "${sort{}{<}{$item}}" + # 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 7200bf3a7..a3706ee5a 100644 --- a/test/stdout/0002 +++ b/test/stdout/0002 @@ -71,6 +71,13 @@ > listextract: fail > Failed: "extract" failed and "fail" requested > +> sort: 1:2:3:4 +> sort: 4,3,2,1 +> sort: a:aa:B:c +> sort: 10 smtp.ex.com:100 r2.ex.com:666 r99.ex.com +> sort: 10,smtp.ex.com:100,r2.ex.com:666,r99.ex.com +> sort: "" +> > # Tests with iscntrl() and illegal separators > > map: 'a' -- cgit v1.2.3