g2                                       Thu, 03 Sep 2009 18:40:09 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=287999

Log:
updated commandline-options and testcase

Changed paths:
    U   php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php
    U   php/phpruntests/trunk/src/texts/help.txt
    U   php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php

Modified: php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php
===================================================================
--- php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php    
2009-09-03 18:32:37 UTC (rev 287998)
+++ php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php    
2009-09-03 18:40:09 UTC (rev 287999)
@@ -30,6 +30,8 @@
      * @var array
      */
     protected $shortOptionsWithArgs = array(
+        'l', // read the testfiles to be executed from
+        'r', // read the testfiles to be executed from
         'c', // look for php.ini
         'd', // pass option to the php binary
         'p', // specify php executable

Modified: php/phpruntests/trunk/src/texts/help.txt
===================================================================
--- php/phpruntests/trunk/src/texts/help.txt    2009-09-03 18:32:37 UTC (rev 
287998)
+++ php/phpruntests/trunk/src/texts/help.txt    2009-09-03 18:40:09 UTC (rev 
287999)
@@ -1,4 +1,3 @@
-
 Synopsis:
     php run-tests.php [options] [files] [directories]

@@ -24,7 +23,14 @@
     -o <list|csv|xml>    Output format (default=list)

     -s <file>    Write output to <file>
+
+    -l <file>   Read the testfiles to be executed from <file>. After the test
+                has finished all failed tests are written to the same <file>.
+                If the list is empty and no further test is specified then
+                all tests are executed (same as: -r <file> -w <file>).

+    -r <file>   Read the testfiles to be executed from <file>.
+
     -v          verbose-mode level 1
                 basic information, test-name and status


Modified: php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php
===================================================================
--- php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php      
2009-09-03 18:32:37 UTC (rev 287998)
+++ php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php      
2009-09-03 18:40:09 UTC (rev 287999)
@@ -33,19 +33,19 @@
     public function testShortOptionWithArg()
     {
         $clo = new rtCommandLineOptions();
-        $clo->parse(array('run-tests.php', '-l', 'the-l-arg'));
+        $clo->parse(array('run-tests.php', '-d', 'the-d-arg'));

-        $this->assertTrue($clo->hasOption('l'));
-        $this->assertEquals('the-l-arg', $clo->getOption('l'));
+        $this->assertTrue($clo->hasOption('d'));
+        $this->assertEquals('the-d-arg', $clo->getOption('d'));
     }

     public function testLongOptionWithArg()
     {
         $clo = new rtCommandLineOptions();
-        $clo->parse(array('run-tests.php', '--html', 'the-html-arg'));
+        $clo->parse(array('run-tests.php', '--keep-all', 'the-keepall-arg'));

-        $this->assertTrue($clo->hasOption('html'));
-        $this->assertEquals('the-html-arg', $clo->getOption('html'));
+        $this->assertTrue($clo->hasOption('keep-all'));
+        $this->assertEquals('the-keepall-arg', $clo->getOption('keep-all'));
     }

     public function testNonexistingOption()
@@ -63,8 +63,8 @@
     public function testMissingShortOptionArgument()
     {
         $clo = new rtCommandLineOptions();
-        $clo->parse(array('run-tests.php', '-l'));
-        $clo->getOption('l');
+        $clo->parse(array('run-tests.php', '-d'));
+        $clo->getOption('d');
     }

     /**
@@ -73,8 +73,8 @@
     public function testMissingLongOptionArgument()
     {
         $clo = new rtCommandLineOptions();
-        $clo->parse(array('run-tests.php', '--html'));
-        $clo->getOption('html');
+        $clo->parse(array('run-tests.php', '--mopts'));
+        $clo->getOption('--mopts');
     }

     public function testFileArgument()

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to