summaryrefslogtreecommitdiff
path: root/sapi/cli/tests
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2007-03-22 21:35:41 +0000
committerJohannes Schlüter <johannes@php.net>2007-03-22 21:35:41 +0000
commitd95939d566fcacc991543fbcc0ebefd5d69efbf5 (patch)
tree1d996296e1b198795a4632dc727094b000a7bbc2 /sapi/cli/tests
parent76329a99f08abffe42ee128ed2402a17a476933a (diff)
downloadphp-git-d95939d566fcacc991543fbcc0ebefd5d69efbf5.tar.gz
- MFH: Fix handling of not existing long CLI options
Diffstat (limited to 'sapi/cli/tests')
-rw-r--r--sapi/cli/tests/015.phpt30
1 files changed, 30 insertions, 0 deletions
diff --git a/sapi/cli/tests/015.phpt b/sapi/cli/tests/015.phpt
new file mode 100644
index 0000000000..e5c0ab0259
--- /dev/null
+++ b/sapi/cli/tests/015.phpt
@@ -0,0 +1,30 @@
+--TEST--
+CLI long options
+--SKIPIF--
+<?php include "skipif.inc"; ?>
+--FILE--
+<?php
+
+$php = getenv('TEST_PHP_EXECUTABLE');
+
+
+echo `"$php" --version | grep built:`;
+echo `echo "<?php print_r(\\\$argv);" | "$php" -- foo bar baz`, "\n";
+echo `"$php" --version foo bar baz | grep built:`;
+echo `"$php" --notexisting foo bar baz | grep Usage:`;
+
+echo "Done\n";
+?>
+--EXPECTF--
+PHP %d.%d.%d%s(cli) (built: %s)
+Array
+(
+ [0] => -
+ [1] => foo
+ [2] => bar
+ [3] => baz
+)
+
+PHP %d.%d.%d%s(cli) (built: %s)
+Usage: php [options] [-f] <file> [--] [args...]
+Done