From: Michael Wallner Date: Tue, 21 Feb 2017 10:23:57 +0000 (+0100) Subject: tests: add missing getopt002.phpt X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=595c5768480ef722c70c83b5b2b915cf49f68272;p=m6w6%2Fext-psi tests: add missing getopt002.phpt --- 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===