WordPress.org

Make WordPress Core

Changeset 195 in tests


Ignore:
Timestamp:
04/01/2008 02:18:30 PM (10 years ago)
Author:
nbachiyski
Message:

Allow changing the root from the command line

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-test.php

    r179 r195  
    11<?php
    22
    3 $opts = getopt('v:t:sf');
     3$opts = getopt('v:t:r:sf');
    44
    55define('DIR_TESTROOT', realpath(dirname(__FILE__)));
     
    1515#define('SAVEQUERIES', true);
    1616
    17 if (!empty($opts['v']))
    18     define('DIR_WP', DIR_TESTROOT.'/wordpress-'.$opts['v']);
     17if (!empty($opts['r']))
     18    define('DIR_WP', realpath($opts['r']));
    1919else
    20     define('DIR_WP', DIR_TESTROOT.'/wordpress');
     20    if (!empty($opts['v']))
     21        define('DIR_WP', DIR_TESTROOT.'/wordpress-'.$opts['v']);
     22    else
     23        define('DIR_WP', DIR_TESTROOT.'/wordpress');
    2124
    2225// make sure errors are displayed during setup
Note: See TracChangeset for help on using the changeset viewer.