From 595c5768480ef722c70c83b5b2b915cf49f68272 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 21 Feb 2017 11:23:57 +0100 Subject: [PATCH] tests: add missing getopt002.phpt --- tests/getopt/getopt002.phpt | 100 ++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 tests/getopt/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=== -- 2.30.2