X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=tests%2Fgetopt%2Fgetopt002.phpt;fp=tests%2Fgetopt%2Fgetopt002.phpt;h=724eed6c6b18c2ee0a2f02989de0a0d2e51bc30d;hp=0000000000000000000000000000000000000000;hb=595c5768480ef722c70c83b5b2b915cf49f68272;hpb=1a088a813e5b35b85fe3eddfb48cb809bd707196 diff --git a/tests/getopt/getopt002.phpt b/tests/getopt/getopt002.phpt new file mode 100644 index 0000000..724eed6 --- /dev/null +++ b/tests/getopt/getopt002.phpt @@ -0,0 +1,100 @@ +--TEST-- +getopt +--INI-- +psi.directory={PWD}:{PWD}/../../psi.d +--SKIPIF-- + +--ENV-- +POSIXLY_CORRECT= +--FILE-- +===TEST=== + +===DONE=== +--EXPECT-- +===TEST=== +got v +got x: 1 +got s: foo +arg: huh +arg: -gotcha +arg: --bar +arg: baz +got v +got x: 1 +got s: foo +arg: huh +arg: -gotcha +arg: --bar +arg: baz +got v +got x: 1 +got s: foo +arg: huh +arg: -gotcha +arg: --bar +arg: baz +array(11) { + [0]=> + string(8) "progname" + [1]=> + string(2) "-v" + [2]=> + string(2) "-x" + [3]=> + string(1) "1" + [4]=> + string(2) "-s" + [5]=> + string(3) "foo" + [6]=> + string(2) "--" + [7]=> + string(3) "huh" + [8]=> + string(7) "-gotcha" + [9]=> + string(5) "--bar" + [10]=> + string(3) "baz" +} +===DONE===