2008-08-29 22:56:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once '_inc.php';
|
|
|
|
|
|
|
|
function test_Lines()
|
|
|
|
{
|
|
|
|
global $thisDir;
|
|
|
|
|
|
|
|
$exp = file_get_contents("{$thisDir}/_test_files/minify/lines_output.js");
|
|
|
|
|
2009-01-26 17:06:01 +00:00
|
|
|
Minify::setCache(null); // no cache
|
|
|
|
|
2008-08-29 22:56:34 +00:00
|
|
|
$ret = Minify::serve('Files', array(
|
|
|
|
'debug' => true
|
|
|
|
,'quiet' => true
|
|
|
|
,'encodeOutput' => false
|
|
|
|
,'files' => array(
|
2013-03-29 13:26:10 -04:00
|
|
|
"{$thisDir}/_test_files/js/before.js"
|
2008-08-29 22:56:34 +00:00
|
|
|
)
|
|
|
|
));
|
|
|
|
|
|
|
|
$passed = assertTrue($exp === $ret['content'], 'Minify_Lines');
|
|
|
|
|
|
|
|
if (__FILE__ === realpath($_SERVER['SCRIPT_FILENAME'])) {
|
2010-05-16 01:27:33 +00:00
|
|
|
echo "\n---Output: " .countBytes($ret['content']). " bytes\n\n{$ret['content']}\n\n";
|
2008-08-29 22:56:34 +00:00
|
|
|
if (!$passed) {
|
2010-05-16 01:27:33 +00:00
|
|
|
echo "---Expected: " .countBytes($exp). " bytes\n\n{$exp}\n\n\n";
|
2008-08-29 22:56:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-06-30 19:46:23 +00:00
|
|
|
test_Lines();
|