From c18d3b56e7cd208d5ec1c2fffb7ef786bbc3b677 Mon Sep 17 00:00:00 2001 From: Zoe Slattery Date: Wed, 28 Mar 2007 10:44:04 +0000 Subject: new ltrim, rtrim and str_pad tests --- ext/standard/tests/strings/ltrim.phpt | 83 ++++++++++++++++++++++++++++++++ ext/standard/tests/strings/rtrim.phpt | Bin 0 -> 2422 bytes ext/standard/tests/strings/str_pad.phpt | Bin 0 -> 9072 bytes 3 files changed, 83 insertions(+) create mode 100644 ext/standard/tests/strings/ltrim.phpt create mode 100644 ext/standard/tests/strings/rtrim.phpt create mode 100644 ext/standard/tests/strings/str_pad.phpt diff --git a/ext/standard/tests/strings/ltrim.phpt b/ext/standard/tests/strings/ltrim.phpt new file mode 100644 index 0000000000..cb64b9cd32 --- /dev/null +++ b/ext/standard/tests/strings/ltrim.phpt @@ -0,0 +1,83 @@ +--TEST-- +Test ltrim() function +--FILE-- + +--EXPECTF-- +*** Output for Error Conditions *** + + *** Output for zero argument *** + +Warning: Wrong parameter count for ltrim() in %s on line %d +NULL + + *** Output for more than valid number of arguments (Valid are 1 or 2 arguments) *** + +Warning: Wrong parameter count for ltrim() in %s on line %d +NULL + + *** Using heredoc string *** +string(17) "ng heredoc string" + + *** Output for Normal Behaviour *** +string(10) "ltrim test" +string(13) " ltrim test" +string(18) " ltrim test" +string(18) " ltrim test" +string(10) "ltrim test" +string(11) " ltrim test" +string(10) "ltrim test" +string(10) "ltrim test" +string(10) "ltrim test" + + *** Output for scalar argument) *** +string(5) "12345" + + *** Output for NULL argument) *** +string(0) "" + +Done diff --git a/ext/standard/tests/strings/rtrim.phpt b/ext/standard/tests/strings/rtrim.phpt new file mode 100644 index 0000000000..329ead4201 Binary files /dev/null and b/ext/standard/tests/strings/rtrim.phpt differ diff --git a/ext/standard/tests/strings/str_pad.phpt b/ext/standard/tests/strings/str_pad.phpt new file mode 100644 index 0000000000..b0b93c81ba Binary files /dev/null and b/ext/standard/tests/strings/str_pad.phpt differ -- cgit v1.2.1