Annotation of embedaddon/php/ext/standard/tests/assert/assert_basic3.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: assert() - basic - Test that bailout works
        !             3: --INI--
        !             4: assert.active = 1
        !             5: assert.warning = 1
        !             6: assert.callback = f1
        !             7: assert.quiet_eval = 1
        !             8: assert.bail = 0
        !             9: --FILE--
        !            10: <?php
        !            11: function f1() 
        !            12: {
        !            13:        echo "f1 called\n";
        !            14: }
        !            15: 
        !            16: //bail out on error
        !            17: var_dump($rao=assert_options(ASSERT_BAIL, 1));
        !            18: $sa = "0 != 0";
        !            19: var_dump($r2=assert($sa));
        !            20: echo "If this is printed BAIL hasn't worked";
        !            21: --EXPECTF--
        !            22: int(0)
        !            23: f1 called
        !            24: 
        !            25: Warning: assert(): Assertion "0 != 0" failed in %s on line 10

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