cvs: pear /PEAR_PackageFileManager/tests PEAR_PackageFileManager_File_TestCase_getRegExpableSearchString.php testsuite.php
/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString test_1.phpt test_dir_regexp.phpt test_file_regexp.phpt

From: Date: Mon, 28 Mar 2005 03:28:35 +0000
Subject: cvs: pear /PEAR_PackageFileManager/tests PEAR_PackageFileManager_File_TestCase_getRegExpableSearchString.php testsuite.php
/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString test_1.phpt test_dir_regexp.phpt test_file_regexp.phpt
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-30705@lists.php.net to get a copy of this message
cellog Sun Mar 27 22:28:35 2005 EDT Added files: /pear/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString test_1.phpt test_dir_regexp.phpt test_file_regexp.phpt Removed files: /pear/PEAR_PackageFileManager/tests PEAR_PackageFileManager_File_TestCase_getRegExpableSearchString.php Modified files: /pear/PEAR_PackageFileManager/tests testsuite.php Log: more conversion of phpunit -> phpt http://cvs.php.net/diff.php/pear/PEAR_PackageFileManager/tests/testsuite.php?r1=1.22&r2=1.23&ty=u Index: pear/PEAR_PackageFileManager/tests/testsuite.php diff -u pear/PEAR_PackageFileManager/tests/testsuite.php:1.22 pear/PEAR_PackageFileManager/tests/testsuite.php:1.23 --- pear/PEAR_PackageFileManager/tests/testsuite.php:1.22 Sun Mar 27 22:06:18 2005 +++ pear/PEAR_PackageFileManager/tests/testsuite.php Sun Mar 27 22:28:34 2005 @@ -4,7 +4,7 @@ * HTML output for PHPUnit suite tests. * * Copied for PEAR_PackageFileManager from HTML_CSS - * @version $Id: testsuite.php,v 1.22 2005/03/28 03:06:18 cellog Exp $ + * @version $Id: testsuite.php,v 1.23 2005/03/28 03:28:34 cellog Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_CSS */ @@ -57,7 +57,6 @@ 'PEAR_PackageFileManager_TestCase_addMaintainer', 'PEAR_PackageFileManager_TestCase_addConfigureOption', 'PEAR_PackageFileManager_TestCase_addDependency', - 'PEAR_PackageFileManager_File_TestCase_getRegExpableSearchString', 'PEAR_PackageFileManager_File_TestCase_setupIgnore', 'PEAR_PackageFileManager_File_TestCase_setupDirs', 'PEAR_PackageFileManager_File_TestCase_setDir', http://cvs.php.net/co.php/pear/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString/test_1.phpt?r=1.1&p=1 Index: pear/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString/test_1.phpt +++ pear/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString/test_1.phpt --TEST-- PEAR_PackageFileManager_File->getRegExpableSearchString, test of special characters --SKIPIF-- --FILE-- <?php require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'setup.php.inc'; $res1 = $packagexml->_getRegExpableSearchString('frog?.a*\\/[]-'); $phpunit->assertEquals('frog.\.a.*\\\\\\\\\\[\\]\\-', $res1, 'wrong regexp 1'); $res = $packagexml->_getRegExpableSearchString('frog?.a*\\/[]-' . DIRECTORY_SEPARATOR); $y = '\/'; if (DIRECTORY_SEPARATOR == '\\') { $y = '\\\\'; } $res1 .= $y; $phpunit->assertEquals("(?:.*$y$res1?.*|$res1.*)", $res, 'wrong regexp 2'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString/test_dir_regexp.phpt?r=1.1&p=1 Index: pear/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString/test_dir_regexp.phpt +++ pear/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString/test_dir_regexp.phpt --TEST-- PEAR_PackageFileManager_File->getRegExpableSearchString, directory pattern --SKIPIF-- --FILE-- <?php require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'setup.php.inc'; $res = $packagexml->_getRegExpableSearchString('frog/'); $y = '\/'; if (DIRECTORY_SEPARATOR == '\\') { $y = '\\\\'; } $phpunit->assertEquals('(?:.*' . $y . 'frog\\' . DIRECTORY_SEPARATOR . '?.*|frog\\' . DIRECTORY_SEPARATOR . '.*)', $res, 'wrong regexp'); $phpunit->assertNotFalse(preg_match("/^$res$/", 'frog' . DIRECTORY_SEPARATOR . '1-hairy.php'), 'did not match frog//1-hairy.php'); $phpunit->assertNotTrue(preg_match("/^$res$/", 'frog1-hairy' . DIRECTORY_SEPARATOR . 'thingo.php'), 'matched frog1-hairy//thingo.php'); $phpunit->assertNotFalse(preg_match("/^$res$/", 'my' . DIRECTORY_SEPARATOR . 'frog' . DIRECTORY_SEPARATOR . 'thingo.php'), 'did not match my\\frog\\thingo.php'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString/test_file_regexp.phpt?r=1.1&p=1 Index: pear/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString/test_file_regexp.phpt +++ pear/PEAR_PackageFileManager/tests/PEAR_PackageFileManager_File/getRegExpableSearchString/test_file_regexp.phpt --TEST-- PEAR_PackageFileManager_File->getRegExpableSearchString, file pattern --SKIPIF-- --FILE-- <?php require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'setup.php.inc'; $res = $packagexml->_getRegExpableSearchString('frog?-*.php'); $phpunit->assertEquals('frog.\-.*\.php', $res, 'wrong regexp'); $phpunit->assertNotFalse(preg_match("/^$res$/", 'frog1-hairy.php'), 'did not match frog1-hairy.php'); $phpunit->assertNotFalse(preg_match("/^$res$/", 'frog1-hairy/thingo.php'), 'did not match frog1-hairy/thingo.php'); $phpunit->assertNotFalse(preg_match("/^$res$/", 'frog1-hairy\\thingo.php'), 'did not match frog1-hairy\\thingo.php'); $phpunit->assertNotTrue(preg_match("/^$res$/", 'frog11-hairy.php'), 'matched frog11-hairy.php'); echo 'tests done'; ?> --EXPECT-- tests done

« previous php.pear.cvs (#30705) next »