diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
| commit | 8f1428d29ef91d74b4d272af171675f2971eb15b (patch) | |
| tree | a1f4f4d7dc5bfe8096806dd5c5266634e19fa07a /sapi/cli/tests | |
| parent | c6e4182351e0173fe58de141e143aac2eacf5efe (diff) | |
| download | php-upstream/5.3.9.tar.gz | |
Imported Upstream version 5.3.9upstream/5.3.9
Diffstat (limited to 'sapi/cli/tests')
| -rw-r--r-- | sapi/cli/tests/016.phpt | 34 | ||||
| -rw-r--r-- | sapi/cli/tests/021.phpt | 4 | ||||
| -rw-r--r-- | sapi/cli/tests/022.phpt | 2 |
3 files changed, 32 insertions, 8 deletions
diff --git a/sapi/cli/tests/016.phpt b/sapi/cli/tests/016.phpt index adde106df..9c28d15a3 100644 --- a/sapi/cli/tests/016.phpt +++ b/sapi/cli/tests/016.phpt @@ -65,25 +65,37 @@ Snippet no. 1: -------------- Interactive shell -php > Hello world -php > +php > echo 'Hello world'; +Hello world +php > exit + -------------- Snippet no. 2: -------------- Interactive shell -php > php ' php ' multine +php > echo 'multine +php ' single +php ' quote'; +multine single quote -php > +php > exit + -------------- Snippet no. 3: -------------- Interactive shell -php > <<< > <<< > <<< > <<< > <<< > Here +php > echo <<<HEREDOC +<<< > Here +<<< > comes +<<< > the +<<< > doc +<<< > HEREDOC; +Here comes the doc @@ -94,7 +106,11 @@ Snippet no. 4: -------------- Interactive shell -php > php { php { php > Done +php > if (0) { +php { echo "I'm not there"; +php { } +php > echo "Done"; +Done php > -------------- @@ -102,7 +118,11 @@ Snippet no. 5: -------------- Interactive shell -php > php { php { php > I was called! +php > function a_function_with_some_name() { +php { echo "I was called!"; +php { } +php > a_function_with_some_name(); +I was called! php > Done diff --git a/sapi/cli/tests/021.phpt b/sapi/cli/tests/021.phpt index a4442b0e0..2ddd68890 100644 --- a/sapi/cli/tests/021.phpt +++ b/sapi/cli/tests/021.phpt @@ -6,6 +6,10 @@ include 'skipif.inc'; if (substr(PHP_OS, 0, 3) == 'WIN') { die ("skip not for Windows"); } + +if (strlen("#!".getenv('TEST_PHP_EXECUTABLE')) > 127) { + die ("skip shebang is too long, see http://www.in-ulm.de/~mascheck/various/shebang/#results"); +} ?> --FILE-- <?php diff --git a/sapi/cli/tests/022.phpt b/sapi/cli/tests/022.phpt index eabb8bdf8..0110220be 100644 --- a/sapi/cli/tests/022.phpt +++ b/sapi/cli/tests/022.phpt @@ -8,7 +8,7 @@ if (substr(PHP_OS, 0, 3) == "WIN") die("skip non windows test"); --FILE-- <?php $php = getenv("TEST_PHP_EXECUTABLE"); -$socket_file = dirname(__FILE__) . '/' . pathinfo(__FILE__, PATHINFO_FILENAME) . '.sock'; +$socket_file = tempnam(sys_get_temp_dir(), pathinfo(__FILE__, PATHINFO_FILENAME) . '.sock'); $test_file = dirname(__FILE__) . '/' . pathinfo(__FILE__, PATHINFO_FILENAME) . '.inc'; if (file_exists($socket_file)) { unlink($socket_file); |
