File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / sapi / cli / tests / 010-2.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 4 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    1: --TEST--
    2: executing a code with -R
    3: --SKIPIF--
    4: <?php 
    5: include "skipif.inc"; 
    6: if (substr(PHP_OS, 0, 3) == 'WIN') {
    7: 	die ("skip not for Windows");
    8: }
    9: ?>
   10: --FILE--
   11: <?php
   12: 
   13: $php = getenv('TEST_PHP_EXECUTABLE');
   14: 
   15: $filename_txt = dirname(__FILE__)."/010.test.txt";
   16: 
   17: $txt = '
   18: test
   19: hello
   20: ';
   21: 
   22: file_put_contents($filename_txt, $txt);
   23: 
   24: var_dump(`cat "$filename_txt" | "$php" -n -R "var_dump(1);"`);
   25: 
   26: @unlink($filename_txt);
   27: 
   28: echo "Done\n";
   29: ?>
   30: --EXPECTF--	
   31: string(21) "int(1)
   32: int(1)
   33: int(1)
   34: "
   35: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>