0
|
1 --TEST--
|
|
2 Console_Getopt [bug 10557]
|
|
3 --SKIPIF--
|
|
4 --FILE--
|
|
5 <?php
|
|
6 $_SERVER['argv'] =
|
|
7 $argv = array('hi', '-fjjohnston@mail.com', '--to', '--mailpack', '--debug');
|
|
8 require_once 'Console/Getopt.php';
|
|
9 $ret = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), 'f:t:',
|
|
10 array('from=','to=','mailpack=','direction=','verbose','debug'));
|
|
11 if(PEAR::isError($ret))
|
|
12 {
|
|
13 echo $ret->getMessage()."\n";
|
|
14 echo 'FATAL';
|
|
15 exit;
|
|
16 }
|
|
17
|
|
18 print_r($ret);
|
|
19 ?>
|
|
20 --EXPECT--
|
|
21 Console_Getopt: option requires an argument --to
|
|
22 FATAL |