X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=tests%2Fgetopt%2Fgetopt001.phpt;fp=tests%2Fgetopt%2Fgetopt001.phpt;h=462b4709bafe4696dc1974737e3792cf1ec27386;hp=0000000000000000000000000000000000000000;hb=a107dfcca2dfd0fc5a2779a8d679f778cb8f3290;hpb=dfc032e7e195fc09c5ad2cda81d00a8958b80a66 diff --git a/tests/getopt/getopt001.phpt b/tests/getopt/getopt001.phpt new file mode 100644 index 0000000..462b470 --- /dev/null +++ b/tests/getopt/getopt001.phpt @@ -0,0 +1,80 @@ +--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 +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===