git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_SGD/tags/3.7.0.2_original@1 eb19766c-00d9-a042-a3a0-45cb8ec72764
35 lines
935 B
PHP
35 lines
935 B
PHP
<?php
|
|
|
|
require_once("../../../config/dmsDefaults.php");
|
|
require_once(KT_LIB_DIR . "/util/ktutil.inc");
|
|
|
|
$aSource = array(
|
|
array('unzip', "-q", "-j", "-n", "-d", '/tmp', '5 July 2005 Pricelist - Rectron(cpt).zip'),
|
|
array('unzip', "-q", "-j", "-n", "-d", '/tmp', "5'th July 2005 Pricelist - Rectron(cpt).zip"),
|
|
array('echo', ''),
|
|
array('echo', ' '),
|
|
);
|
|
|
|
$aExpectedResults = array(
|
|
"'unzip' '-q' '-j' '-n' '-d' '/tmp' '5 July 2005 Pricelist - Rectron(cpt).zip'",
|
|
"'unzip' '-q' '-j' '-n' '-d' '/tmp' '5'\''th July 2005 Pricelist - Rectron(cpt).zip'",
|
|
"'echo' ''",
|
|
"'echo' ' '",
|
|
);
|
|
|
|
$aResults = array();
|
|
|
|
foreach ($aSource as $aArgs) {
|
|
$aResults[] = KTUtil::safeShellString($aArgs);
|
|
}
|
|
|
|
if ($aResults === $aExpectedResults) {
|
|
print "Success!\n";
|
|
} else {
|
|
print "Failure!\n";
|
|
print "Received: " . print_r($aResults, true) . "\n";
|
|
print "Expected: " . print_r($aExpectedResults, true) . "\n";
|
|
}
|
|
|
|
?>
|