From 8083c40376976c401af3d5c6caa6fa64176854ed Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Thu, 7 Feb 2008 13:18:58 +0000 Subject: [PATCH] Added UEXPECTF --- .../general_functions/parse_ini_booleans.phpt | 57 +++++++++++++ .../general_functions/parse_ini_file.phpt | 79 +++++++++++++++++++ 2 files changed, 136 insertions(+) diff --git a/ext/standard/tests/general_functions/parse_ini_booleans.phpt b/ext/standard/tests/general_functions/parse_ini_booleans.phpt index a1be31ddf4..84fb8ca91d 100644 --- a/ext/standard/tests/general_functions/parse_ini_booleans.phpt +++ b/ext/standard/tests/general_functions/parse_ini_booleans.phpt @@ -67,3 +67,60 @@ array(3) { } } Done. +--UEXPECTF-- +array(3) { + [u"error_reporting values"]=> + array(6) { + [u"foo"]=> + unicode(6) "8191 8" + [u"error_reporting"]=> + unicode(4) "8191" + [u"error_reporting1"]=> + unicode(4) "4177" + [u"error_reporting2"]=> + unicode(4) "8183" + [u"error_reporting3"]=> + unicode(4) "8183" + [u"error_reporting4"]=> + unicode(4) "8183" + } + [u"true or false"]=> + array(8) { + [u"bool_true"]=> + unicode(1) "1" + [u"bool_yes"]=> + unicode(1) "1" + [u"bool_on"]=> + unicode(1) "1" + [u"bool_false"]=> + unicode(0) "" + [u"bool_off"]=> + unicode(0) "" + [u"bool_no"]=> + unicode(0) "" + [u"bool_none"]=> + unicode(0) "" + [u"bool_null"]=> + unicode(0) "" + } + [u"strings"]=> + array(8) { + [u"string_true"]=> + unicode(4) "true" + [u"string_yes"]=> + unicode(4) " yes" + [u"string_on"]=> + unicode(5) " on " + [u"string_false"]=> + unicode(5) "false" + [u"string_off"]=> + unicode(4) "Off " + [u"string_no"]=> + unicode(4) "No " + [u"string_none"]=> + unicode(5) " NoNe" + [u"string_null"]=> + unicode(4) "NULl" + } +} +Done. diff --git a/ext/standard/tests/general_functions/parse_ini_file.phpt b/ext/standard/tests/general_functions/parse_ini_file.phpt index 62ed5c79ce..7ebba13200 100644 --- a/ext/standard/tests/general_functions/parse_ini_file.phpt +++ b/ext/standard/tests/general_functions/parse_ini_file.phpt @@ -171,3 +171,82 @@ array(1) { string(5) "test4" } Done +--UEXPECTF-- +Warning: parse_ini_file() expects at least 1 parameter, 0 given in %sparse_ini_file.php on line 6 +bool(false) + +Warning: parse_ini_file() expects at most 3 parameters, 4 given in %sparse_ini_file.php on line 7 +bool(false) + +Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %sparse_ini_file.php on line 8 +array(0) { +} + +Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %sparse_ini_file.php on line 9 +array(0) { +} +array(1) { + [u"test"]=> + unicode(0) "" +} + +Warning: syntax error, unexpected '=' in %sparse_ini_file.dat on line 2 + in %sparse_ini_file.php on line 20 +array(1) { + [u"test"]=> + unicode(0) "" +} + +Warning: syntax error, unexpected '=' in %sparse_ini_file.dat on line 2 + in %sparse_ini_file.php on line 26 +array(1) { + [u"test"]=> + unicode(4) "test" +} +array(1) { + [u"test"]=> + unicode(8) "new +line" +} +array(1) { + [u"test"]=> + unicode(16) "test const value" +} +array(1) { + [u"section"]=> + array(1) { + [u"test"]=> + unicode(5) "hello" + } +} +array(1) { + [u"test"]=> + unicode(5) "hello" +} +array(1) { + [u"section.test"]=> + unicode(5) "hello" +} +array(1) { + [u"section"]=> + array(1) { + [u"section.test"]=> + unicode(5) "hello" + } +} +array(1) { + [u"section"]=> + array(1) { + [1]=> + unicode(1) "2" + } +} +array(1) { + [1]=> + unicode(1) "2" +} +array(1) { + [u"test"]=> + unicode(5) "test4" +} +Done -- 2.50.1