diff options
| -rw-r--r-- | it.class | 2 | ||||
| -rwxr-xr-x | tests/it_cache.t | 37 | 
2 files changed, 19 insertions, 20 deletions
| @@ -690,7 +690,7 @@ static function imageconvert($p)  	$ultratimeout = file_exists("/opt/ultra/bin/ultratimeout") ? "/opt/ultra/bin/ultratimeout 30 " : "";  	if (in_array($type, explode(',', $p['types'])))	# Valid type? -		$cmdoutput = it::exec('( ' . $ultratimeout . 'gm convert 2>&1 {-opts} {in} {type}:{out} || echo "SHELL ERROR $?" ) | grep -v "iCCP: known incorrect sRGB profile"', $p); +		$cmdoutput = it::exec('( ' . $ultratimeout . 'gm convert 2>&1 {-opts} {in} {type}:{out} || echo "SHELL ERROR $?" ) | grep -v " iCCP: "', $p);  	return $cmdoutput === "";  } diff --git a/tests/it_cache.t b/tests/it_cache.t index cb11297..66fc2d3 100755 --- a/tests/it_cache.t +++ b/tests/it_cache.t @@ -2,46 +2,45 @@  <?php  # test array_based process cache -it_cache::put('it_cache_t', 1); -ok(it_cache::get('it_cache_t') === 1); +it_cache::put('it_cache_t', 42); +is(it_cache::get('it_cache_t'), 42, "cache put number");  it_cache::put('it_cache_t', false); -ok(it_cache::get('it_cache_t') === false); +is(it_cache::get('it_cache_t'), false, "cache get number"); -it_cache::put('it_cache_t', [2]); -ok(it_cache::get('it_cache_t') === [2]); +it_cache::put('it_cache_t', array(2)); +is(it_cache::get('it_cache_t'), array(2), "cache put/get array");  # test non-distributed apc cache -it_cache::put('it_cache_t', 1); +it_cache::put('it_cache_t', 42);  unset($GLOBALS['it_cache_local']); -ok(it_cache::get('it_cache_t') === 1); +is(it_cache::get('it_cache_t'), 42, "local put/get number");  it_cache::put('it_cache_t', false);  unset($GLOBALS['it_cache_local']); -ok(it_cache::get('it_cache_t') === false); +is(it_cache::get('it_cache_t'), false, "local put/get false"); -it_cache::put('it_cache_t', [2]); +it_cache::put('it_cache_t', array(2));  unset($GLOBALS['it_cache_local']); -ok(it_cache::get('it_cache_t') === [2]); +is(it_cache::get('it_cache_t'), array(2), "local put/get array"); -ok(it_cache::get('it_cache_t'.rand(1, 1000)) === null); +is(it_cache::get('it_cache_t'.rand(1, 1000)), null, "local get unknown key");  # test distributed memcache  $GLOBALS['debug_aslive'] = 1; -it_cache::put('it_cache_d', 1, 'distributed' => 1); +it_cache::put('it_cache_d', 42, array('distributed' => 1));  unset($GLOBALS['it_cache_local']); -ok(it_cache::get('it_cache_d', 'distributed' => 1) == '1'); +is(intval(it_cache::get('it_cache_d', array('distributed' => 1))), 42, "distributed put/get number"); -it_cache::put('it_cache_d', false, 'distributed' => 1); +it_cache::put('it_cache_d', false, array('distributed' => 1));  unset($GLOBALS['it_cache_local']); -ok(it_cache::get('it_cache_d', 'distributed' => 1) === ''); +is(boolval(it_cache::get('it_cache_d', array('distributed' => 1))), false, "distributed put/get false"); -it_cache::put('it_cache_d', [2], 'distributed' => 1); +it_cache::put('it_cache_d', array(2), array('distributed' => 1));  unset($GLOBALS['it_cache_local']); -ok(it_cache::get('it_cache_d', 'distributed' => 1) === [2]); - -ok(it_cache::get('it_cache_d'.rand(1, 1000), 'distributed' => 1) === null); +is(it_cache::get('it_cache_d', array('distributed' => 1)), array(2), "distributed put/get array"); +is(it_cache::get('it_cache_d'.rand(1, 1000), array('distributed' => 1)), null, "distributed get unknown key"); |