comparison vendor/pear/console_getopt/tests/bug10557.phpt @ 0:1e000243b222

vanilla 1.3.3 distro, I hope
author Charlie Root
date Thu, 04 Jan 2018 15:50:29 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1e000243b222
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