diff --git a/TSRM/tests/strtok_basic_01.phpt b/TSRM/tests/strtok_basic_01.phpt new file mode 100644 index 0000000000000..8e320bc9d70b1 --- /dev/null +++ b/TSRM/tests/strtok_basic_01.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test the basics to function strtok. +--CREDITS-- +Rodrigo Prado de Jesus +--FILE-- +"); + $tok = strtok(" \n\t"); +} +?> +--EXPECT-- +string(14) "Word=This
" +string(12) "Word=is
" +string(12) "Word=an
" +string(17) "Word=example
" +string(16) "Word=string
" diff --git a/ext/posix/tests/posix_getpwnam_basic_01.phpt b/ext/posix/tests/posix_getpwnam_basic_01.phpt new file mode 100644 index 0000000000000..12fe87ff2d85d --- /dev/null +++ b/ext/posix/tests/posix_getpwnam_basic_01.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test posix_getpwnam() function : basic functionality +--CREDITS-- +Rodrigo Prado de Jesus +--SKIPIF-- + +--FILE-- + +===DONE==== +--EXPECTREGEX-- +Array +\( + \[name\] => [^\r\n]+ + \[passwd\] => [^\r\n]+ + \[uid\] => [0-9]+ + \[gid\] => [0-9]+ + \[gecos\] => [^\r\n]* + \[dir\] => [^\r\n]+ + \[shell\] => [^\r\n]+ +\) +===DONE==== \ No newline at end of file diff --git a/ext/readline/tests/readline_info_wrongparam_001.phpt b/ext/readline/tests/readline_info_wrongparam_001.phpt new file mode 100644 index 0000000000000..f2185795a6ef4 --- /dev/null +++ b/ext/readline/tests/readline_info_wrongparam_001.phpt @@ -0,0 +1,15 @@ +--TEST-- +Test readline_info function : wrong parameter (array) +- line 248 from readline.c +--CREDITS-- +Rodrigo Prado de Jesus +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: readline_info() expects parameter 1 to be string, array given in %s on line %d diff --git a/ext/readline/tests/readline_nullparam.phpt b/ext/readline/tests/readline_nullparam.phpt new file mode 100644 index 0000000000000..c8b9b3a3ace28 --- /dev/null +++ b/ext/readline/tests/readline_nullparam.phpt @@ -0,0 +1,11 @@ +--TEST-- +Test the function readline with null parameter (wrong because the function expects a string parameter). +--CREDITS-- +Rodrigo Prado de Jesus +--SKIPIF-- + +--FILE-- + +--EXPECTF-- diff --git a/ext/readline/tests/readline_read_history_wrongparam_001.phpt b/ext/readline/tests/readline_read_history_wrongparam_001.phpt new file mode 100644 index 0000000000000..974516d8489a5 --- /dev/null +++ b/ext/readline/tests/readline_read_history_wrongparam_001.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test readline_read_history function : wrong parameter (array) +- test line 412 from readline.c +--CREDITS-- +Rodrigo Prado de Jesus +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: readline_read_history() expects parameter 1 to be a valid path, array given in %s on line %d diff --git a/ext/readline/tests/readline_wrongparam_001.phpt b/ext/readline/tests/readline_wrongparam_001.phpt new file mode 100644 index 0000000000000..1f8eff23f4415 --- /dev/null +++ b/ext/readline/tests/readline_wrongparam_001.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test readline function : wrong parameter (array) +- lines from 221 to 223 - readline.c +--CREDITS-- +Rodrigo Prado de Jesus +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: readline() expects parameter 1 to be string, array given in %s on line %d diff --git a/ext/readline/tests/readline_wrongparam_002.phpt b/ext/readline/tests/readline_wrongparam_002.phpt new file mode 100644 index 0000000000000..2c7d52beda77f --- /dev/null +++ b/ext/readline/tests/readline_wrongparam_002.phpt @@ -0,0 +1,13 @@ +--TEST-- +Check the function readline with 2 parameters (wrong because the function expects only one parameter). +- lines from 221 to 223 - readline.c +--CREDITS-- +Rodrigo Prado de Jesus +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: readline() expects at most 1 parameter, 2 given in %s on line %d