Annotation of embedaddon/php/ext/readline/tests/readline_add_history_001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: readline_add_history(): Basic test
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("readline") || !function_exists('readline_list_history')) die("skip"); ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: var_dump(readline_add_history('foo'));
! 9: var_dump(readline_list_history());
! 10: var_dump(readline_add_history(NULL));
! 11: var_dump(readline_list_history());
! 12: var_dump(readline_clear_history());
! 13: var_dump(readline_add_history());
! 14:
! 15: ?>
! 16: --EXPECTF--
! 17: bool(true)
! 18: array(1) {
! 19: [0]=>
! 20: string(3) "foo"
! 21: }
! 22: bool(true)
! 23: array(2) {
! 24: [0]=>
! 25: string(3) "foo"
! 26: [1]=>
! 27: string(0) ""
! 28: }
! 29: bool(true)
! 30:
! 31: Warning: readline_add_history() expects exactly 1 parameter, 0 given in %s on line %d
! 32: NULL
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>