Annotation of embedaddon/php/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test escapeshellcmd() functionality on Windows
        !             3: --SKIPIF--
        !             4: <?php
        !             5: if( substr(PHP_OS, 0, 3) != 'WIN' ) {
        !             6:    die('skip...Valid for Windows only');
        !             7: }
        !             8: ?>
        !             9: --FILE--
        !            10: <?php
        !            11: echo "*** Testing escapeshellcmd() basic operations ***\n";
        !            12: $data = array(
        !            13:        '"abc',
        !            14:        "'abc",
        !            15:        '?<>',
        !            16:        '()[]{}$',
        !            17:        '%^',
        !            18:        '#&;`|*?',
        !            19:        '~<>\\',
        !            20:        '%NOENV%'
        !            21: );
        !            22: 
        !            23: $count = 1;
        !            24: foreach ($data AS $value) {
        !            25:        echo "-- Test " . $count++ . " --\n";
        !            26:        var_dump(escapeshellcmd($value));
        !            27: }
        !            28: 
        !            29: echo "Done\n";
        !            30: ?>
        !            31: --EXPECTF--
        !            32: *** Testing escapeshellcmd() basic operations ***
        !            33: -- Test 1 --
        !            34: string(5) "^"abc"
        !            35: -- Test 2 --
        !            36: string(5) "^'abc"
        !            37: -- Test 3 --
        !            38: string(6) "^?^<^>"
        !            39: -- Test 4 --
        !            40: string(14) "^(^)^[^]^{^}^$"
        !            41: -- Test 5 --
        !            42: string(4) "^%^^"
        !            43: -- Test 6 --
        !            44: string(14) "^#^&^;^`^|^*^?"
        !            45: -- Test 7 --
        !            46: string(8) "^~^<^>^\"
        !            47: -- Test 8 --
        !            48: string(9) "^%NOENV^%"
        !            49: Done

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