0
|
1 --TEST--
|
|
2 Test for Console_CommandLine::parse() method (--help with renderer options).
|
|
3 --SKIPIF--
|
|
4 <?php if(php_sapi_name()!='cli') echo 'skip'; ?>
|
|
5 --ARGS--
|
|
6 --help 2>&1
|
|
7 --FILE--
|
|
8 <?php
|
|
9
|
|
10 require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tests.inc.php';
|
|
11
|
|
12 $parser = buildParser1();
|
|
13 $parser->renderer->line_width = 0;
|
|
14 $parser->renderer->options_on_different_lines = true;
|
|
15 $parser->parse();
|
|
16
|
|
17 ?>
|
|
18 --EXPECT--
|
|
19 Description of our parser goes here...
|
|
20
|
|
21 Usage:
|
|
22 some_program [options] simple [multiple1 multiple2 ...]
|
|
23
|
|
24 Options:
|
|
25 -t
|
|
26 --true test the StoreTrue action
|
|
27 -f
|
|
28 --false test the StoreFalse action
|
|
29 --int=INT test the StoreInt action
|
|
30 --float=FLOAT test the StoreFloat action
|
|
31 -s STRING
|
|
32 --string=STRING test the StoreString action
|
|
33 -c
|
|
34 --counter test the Counter action
|
|
35 --callback=callback test the Callback action
|
|
36 -a ARRAY
|
|
37 --array=ARRAY test the StoreArray action
|
|
38 -p password
|
|
39 --password=password test the Password action
|
|
40 -h
|
|
41 --help show this help message and exit
|
|
42 -v
|
|
43 --version show the program version and exit
|
|
44
|
|
45 Arguments:
|
|
46 simple test a simple argument
|
|
47 multiple test a multiple argument
|