cvs: pear /PHP_Compat/tests/function array_slice.phpt
| From: | Arpad Ray | Date: | Mon, 02 Jan 2006 11:18:02 +0000 |
| Subject: | cvs: pear /PHP_Compat/tests/function array_slice.phpt | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-37241@lists.php.net to get a copy of this message | ||
arpad Mon Jan 2 11:18:02 2006 UTC
Modified files:
/pear/PHP_Compat/tests/function array_slice.phpt
Log:
a few more tests
http://cvs.php.net/viewcvs.cgi/pear/PHP_Compat/tests/function/array_slice.phpt?r1=1.2&r2=1.3&diff_format=u
Index: pear/PHP_Compat/tests/function/array_slice.phpt
diff -u pear/PHP_Compat/tests/function/array_slice.phpt:1.2
pear/PHP_Compat/tests/function/array_slice.phpt:1.3
--- pear/PHP_Compat/tests/function/array_slice.phpt:1.2 Thu Dec 29 03:57:23 2005
+++ pear/PHP_Compat/tests/function/array_slice.phpt Mon Jan 2 11:18:01 2006
@@ -6,21 +6,49 @@
$input = array("a", "b", "c", "d", "e");
-$output = array_slice($input, 2);
-$output = array_slice($input, -2, 1);
-$output = array_slice($input, 0, 3);
-
-print_r(array_slice($input, 2, -1));
-print_r(array_slice($input, 2, -1, true));
+var_dump(array_slice($input, 2, -1));
+var_dump(array_slice($input, 2, -1, true));
+var_dump(array_slice($input, 0));
+var_dump(array_slice($input, -2));
+var_dump(array_slice($input, -2, true));
+var_dump(array_slice($input, -2, -1, true));
?>
--EXPECT--
-Array
-(
- [0] => c
- [1] => d
-)
-Array
-(
- [2] => c
- [3] => d
-)
\ No newline at end of file
+array(2) {
+ [0]=>
+ string(1) "c"
+ [1]=>
+ string(1) "d"
+}
+array(2) {
+ [2]=>
+ string(1) "c"
+ [3]=>
+ string(1) "d"
+}
+array(5) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ [2]=>
+ string(1) "c"
+ [3]=>
+ string(1) "d"
+ [4]=>
+ string(1) "e"
+}
+array(2) {
+ [0]=>
+ string(1) "d"
+ [1]=>
+ string(1) "e"
+}
+array(1) {
+ [0]=>
+ string(1) "d"
+}
+array(1) {
+ [3]=>
+ string(1) "d"
+}