summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorUrban Müller2017-11-30 15:52:38 +0100
committerUrban Müller2017-11-30 15:52:38 +0100
commit27ef35ff6664e9a7cb2a72bd73af716b50dd75fe (patch)
treec726d7ea58ff39fcc886c266388120b2a5190165 /tests
parent31a609e61f9f400b338dc008c468ff7c07188d31 (diff)
downloaditools-27ef35ff6664e9a7cb2a72bd73af716b50dd75fe.tar.gz
itools-27ef35ff6664e9a7cb2a72bd73af716b50dd75fe.tar.bz2
itools-27ef35ff6664e9a7cb2a72bd73af716b50dd75fe.zip
test it::grep invert
Diffstat (limited to 'tests')
-rwxr-xr-xtests/it.t1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/it.t b/tests/it.t
index 8d840ef..22826a6 100755
--- a/tests/it.t
+++ b/tests/it.t
@@ -309,6 +309,7 @@ is(it::grep('ismatch', array('ismatch', 'isnomatch')), array('ismatch'), 'grep
is(it::grep('!', array('ismatch!', 'isnomatch')), array('ismatch!'), '! in regex');
is(it::grep('lower|UPPER', array('lower', 'LOWER', 'upper', 'UPPER'), array('casesensitive' => 1)), array(0 => 'lower', 3 => 'UPPER'), 'set casesensitive');
is(it::grep('match', array('foo' => 'match', 'bar' => 'gna')), array('foo' => 'match'), 'with keys');
+is(it::grep('2', [0 => 1, 1 => 2, 2 => 3], ['invert' => true]), [0 => 1, 2 => 3]);
setlocale(LC_CTYPE, $oldlocale);
ini_set('default_charset', $oldcharset); # end of tests that must run with specific charset