diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2002-12-11 17:38:28 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2002-12-11 17:38:28 +0000 |
commit | c194d9333db2ed24733e69d0044ab7e97c77d600 (patch) | |
tree | b0296202f05dd4372cc0ffd025fb6c34b45934f6 | |
parent | 30f83207feb0acd81c0ac291ba79ceae6fdc2b9f (diff) | |
download | php-git-c194d9333db2ed24733e69d0044ab7e97c77d600.tar.gz |
Added getopt() test.
-rw-r--r-- | ext/standard/tests/general_functions/getopt.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/standard/tests/general_functions/getopt.phpt b/ext/standard/tests/general_functions/getopt.phpt new file mode 100644 index 0000000000..11ba702488 --- /dev/null +++ b/ext/standard/tests/general_functions/getopt.phpt @@ -0,0 +1,27 @@ +--TEST-- +getopt +--ARGS-- +-v -h -d test -m 1234 -t -j +--SKIPIF-- +<?php + if (!ini_get('register_argc_argv')) { + die("skip this test needs register_argc_argv to be enabled"); + } +?> +--FILE-- +<?php + var_dump(getopt("d:m:j:vht")); +?> +--EXPECT-- +array(5) { + ["v"]=> + bool(false) + ["h"]=> + bool(false) + ["d"]=> + string(4) "test" + ["m"]=> + string(4) "1234" + ["t"]=> + bool(false) +} |