diff options
author | David Flatz | 2017-01-25 16:25:40 +0100 |
---|---|---|
committer | David Flatz | 2017-01-25 16:26:40 +0100 |
commit | 9343a50dad78bc43eef2268623e5daf97cb255fb (patch) | |
tree | 16be1807640ac5302a4ddf69b64536f013c43a2d /tests | |
parent | ee8607940a1af96f2366ad4ea75db5b7c2c15c8f (diff) | |
download | itools-9343a50dad78bc43eef2268623e5daf97cb255fb.tar.gz itools-9343a50dad78bc43eef2268623e5daf97cb255fb.tar.bz2 itools-9343a50dad78bc43eef2268623e5daf97cb255fb.zip |
revert changes in it::map
This reverts commit ee8607940a1af96f2366ad4ea75db5b7c2c15c8f.
This reverts commit f59a46a6dfe0194ba43092304029b2b843ed54bc.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/it.t | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -12,6 +12,7 @@ $oldlocale = setlocale(LC_CTYPE, 0); ini_set('default_charset', 'utf-8'); setlocale(LC_CTYPE, 'de_CH'); # required becuase we're checking German umlauts in latin1 mode + function match($regex, $string, $expect, $name, $p = array()) { $GLOBALS['TEST_MORE_LEVEL'] = 1; @@ -417,9 +418,3 @@ is(it::mod(7, 4), 3); is(it::map('5*$k+$v', array(0 => 1, 1 => 2)), array(1, 7)); is(it::map(create_function('$k,$v', 'return 5*$k+$v;'), array(0 => 1, 1 => 2)), array(1, 7)); is(it::map(function($k, $v) {return 5*$k+$v;}, array(0 => 1, 1 => 2)), array(1, 7)); -is(it::map('strlen', array("aaa", "aa")), array(3, 2)); -is(it::map('it::ucfirst', array("aaa")), array("Aaa")); -# Only map selected keys -is(it::map('2*$v', [3, 4, 5], ['keys' => '0,1']), [6, 8, 5]); -is(it::map('2*$v', [3, 4, 5], ['keys' => [0,1]]), [6, 8, 5]); -is(it::map('2*$v', ['foo' => 1, 'bar' => 2], ['keys' => 'foo']), ['foo' => 2, 'bar' =>2]); |