Debian Codegraph @

vendor/pear/console_getopt/tests/bug11068.phpt

raw
1 --TEST--
2 Console_Getopt [bug 11068]
3 --SKIPIF--
4 --FILE--
5 <?php
6 $_SERVER['argv'] =
7 $argv = array('hi', '[email protected]', '--to', 'hi', '-');
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 Array
22 (
23 [0] => Array
24 (
25 [0] => Array
26 (
27 [0] => f
28 [1] => [email protected]
29 )
30
31 [1] => Array
32 (
33 [0] => --to
34 [1] => hi
35 )
36
37 )
38
39 [1] => Array
40 (
41 [0] => -
42 )
43
44 )