WordPress.org

Make WordPress Core

Changeset 502 in tests


Ignore:
Timestamp:
02/01/12 05:53:31 (4 years ago)
Author:
convissor
Message:

Provide help/usage command line argument.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-test.php

    r501 r502  
    1414 *   - -d  Set WP_DEBUG to true 
    1515 *   - -f  Force known bugs 
     16 *   - -h  Help 
    1617 *   - -l  List all tests 
    1718 *   - -m  Test multisite 
     
    2526 
    2627// parse options 
    27 $options = 'v:t:r:msflndq'; 
     28$options = 'v:t:r:msflndqh'; 
    2829if (is_callable('getopt')) { 
    2930    $opts = getopt($options); 
     
    3132    include( dirname(__FILE__) . '/wp-testlib/getopt.php' ); 
    3233    $opts = getoptParser::getopt($options); 
     34} 
     35 
     36if (isset($opts['h'])) { 
     37    echo <<<EOH 
     38WordPress Testrunner 
     39 
     40Usage: php wp-test.php [arguments] 
     41 
     42Examples: 
     43# php wp-test.php 
     44# php wp-test.php -l 
     45# php wp-test.php -t TestImageMetaFunctions,TestImageSizeFunctions 
     46 
     47Arguments: 
     48  -d  Set WP_DEBUG to true 
     49  -f  Force known bugs 
     50  -h  Help 
     51  -l  List all tests 
     52  -m  Test multisite 
     53  -n  Do not clean up the database at the end of the run 
     54  -q  Save queries 
     55  -r  Uses the given path as the WP_DIR to be tested.  Overrides -v. 
     56  -s  Skip known bugs 
     57  -t  Specific test class names to be run (separated by spaces or commas) 
     58  -v  Sets WP_DIR to "DIR_TESTROOT/wordpress-<value>".  Overridden by -r. 
     59 
     60EOH; 
     61    exit(1); 
    3362} 
    3463 
Note: See TracChangeset for help on using the changeset viewer.