Annotation of embedaddon/php/ext/standard/tests/general_functions/escapeshellarg_basic-win32.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test escapeshellarg() function: basic test
! 3: --SKIPIF--
! 4: <?php
! 5: if( substr(PHP_OS, 0, 3) != "WIN" )
! 6: die("skip.. only for Windows");
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10: /* Prototype : string escapeshellarg ( string $arg )
! 11: * Description: Escape a string to be used as a shell argument.
! 12: * Source code: ext/standard/exec.c
! 13: * Alias to functions:
! 14: */
! 15:
! 16: echo "Simple testcase for escapeshellarg() function\n";
! 17:
! 18: var_dump(escapeshellarg("Mr O'Neil"));
! 19: var_dump(escapeshellarg("Mr O\'Neil"));
! 20: var_dump(escapeshellarg("%FILENAME"));
! 21: var_dump(escapeshellarg(""));
! 22:
! 23: echo "Done\n";
! 24: ?>
! 25: --EXPECT--
! 26: Simple testcase for escapeshellarg() function
! 27: string(11) ""Mr O'Neil""
! 28: string(12) ""Mr O\'Neil""
! 29: string(11) "" FILENAME""
! 30: string(2) """"
! 31: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>