Mercurial > hg > isophonics-drupal-site
annotate vendor/pear/console_getopt/tests/bug11068.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 11068] |
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', 'hi', '-'); |
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 Array |
Chris@18 | 22 ( |
Chris@18 | 23 [0] => Array |
Chris@18 | 24 ( |
Chris@18 | 25 [0] => Array |
Chris@18 | 26 ( |
Chris@18 | 27 [0] => f |
Chris@18 | 28 [1] => jjohnston@mail.com |
Chris@18 | 29 ) |
Chris@18 | 30 |
Chris@18 | 31 [1] => Array |
Chris@18 | 32 ( |
Chris@18 | 33 [0] => --to |
Chris@18 | 34 [1] => hi |
Chris@18 | 35 ) |
Chris@18 | 36 |
Chris@18 | 37 ) |
Chris@18 | 38 |
Chris@18 | 39 [1] => Array |
Chris@18 | 40 ( |
Chris@18 | 41 [0] => - |
Chris@18 | 42 ) |
Chris@18 | 43 |
Chris@18 | 44 ) |