From: Felipe Pena Date: Fri, 21 Nov 2008 21:00:16 +0000 (+0000) Subject: - New tests X-Git-Tag: BEFORE_HEAD_NS_CHANGES_MERGE~127 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c9626395c0c87cae04f680c17c852ea0e0b2d0f;p=php - New tests --- diff --git a/ext/readline/tests/readline_add_history_001.phpt b/ext/readline/tests/readline_add_history_001.phpt new file mode 100644 index 0000000000..929079a066 --- /dev/null +++ b/ext/readline/tests/readline_add_history_001.phpt @@ -0,0 +1,30 @@ +--TEST-- +readline_add_history(): Basic test +--FILE-- + +--EXPECTF-- +bool(true) +array(1) { + [0]=> + string(3) "foo" +} +bool(true) +array(2) { + [0]=> + string(3) "foo" + [1]=> + string(0) "" +} +bool(true) + +Warning: readline_add_history() expects exactly 1 parameter, 0 given in %s on line %d +NULL diff --git a/ext/readline/tests/readline_clear_history_001.phpt b/ext/readline/tests/readline_clear_history_001.phpt new file mode 100644 index 0000000000..6508a02394 --- /dev/null +++ b/ext/readline/tests/readline_clear_history_001.phpt @@ -0,0 +1,14 @@ +--TEST-- +readline_clear_history(): Basic test +--FILE-- + +--EXPECTF-- +bool(true) + +Warning: readline_clear_history() expects exactly 0 parameters, 1 given in %s on line %d +NULL diff --git a/ext/readline/tests/readline_info_001.phpt b/ext/readline/tests/readline_info_001.phpt new file mode 100644 index 0000000000..9eebc6a6bd --- /dev/null +++ b/ext/readline/tests/readline_info_001.phpt @@ -0,0 +1,43 @@ +--TEST-- +readline_info(): Basic test +--FILE-- + +--EXPECTF-- +array(10) { + ["line_buffer"]=> + string(0) "" + ["point"]=> + int(0) + ["end"]=> + int(0) + ["mark"]=> + int(0) + ["done"]=> + int(0) + ["pending_input"]=> + int(0) + ["prompt"]=> + string(0) "" + ["terminal_name"]=> + string(0) "" + ["library_version"]=> + string(3) "5.2" + ["readline_name"]=> + string(5) "other" +} +NULL +NULL +string(0) "" +string(5) "other" +string(5) "other" +string(1) "1" diff --git a/ext/readline/tests/readline_list_history_001.phpt b/ext/readline/tests/readline_list_history_001.phpt new file mode 100644 index 0000000000..b2c6e0ac67 --- /dev/null +++ b/ext/readline/tests/readline_list_history_001.phpt @@ -0,0 +1,15 @@ +--TEST-- +readline_list_history(): Basic test +--FILE-- + +--EXPECTF-- +array(0) { +} + +Warning: Wrong parameter count for readline_list_history() in %s on line %d +NULL diff --git a/ext/readline/tests/readline_write_history_001.phpt b/ext/readline/tests/readline_write_history_001.phpt new file mode 100644 index 0000000000..b03941300c --- /dev/null +++ b/ext/readline/tests/readline_write_history_001.phpt @@ -0,0 +1,24 @@ +--TEST-- +readline_write_history(): Basic test +--FILE-- + +--EXPECT-- +string(8) "foo + +1 + +"