annotate vendor/pear/console_getopt/tests/bug10557.phpt @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents af1871eacc83
children
rev   line source
Chris@18 1 --TEST--
Chris@18 2 Console_Getopt [bug 10557]
Chris@18 3 --SKIPIF--
Chris@18 4 --FILE--
Chris@18 5 <?php
Chris@18 6 $_SERVER['argv'] =
Chris@18 7 $argv = array('hi', '-fjjohnston@mail.com', '--to', '--mailpack', '--debug');
Chris@18 8 require_once 'Console/Getopt.php';
Chris@18 9 $ret = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), 'f:t:',
Chris@18 10 array('from=','to=','mailpack=','direction=','verbose','debug'));
Chris@18 11 if(PEAR::isError($ret))
Chris@18 12 {
Chris@18 13 echo $ret->getMessage()."\n";
Chris@18 14 echo 'FATAL';
Chris@18 15 exit;
Chris@18 16 }
Chris@18 17
Chris@18 18 print_r($ret);
Chris@18 19 ?>
Chris@18 20 --EXPECT--
Chris@18 21 Console_Getopt: option requires an argument --to
Chris@18 22 FATAL