From 30a5ad7d6f069cc6eed4654d9b0c938516cbf1fe Mon Sep 17 00:00:00 2001 From: Manuel Rubio Date: Thu, 28 May 2015 09:08:55 +0200 Subject: [PATCH] fix tests according to new output of print_r --- test/code/test_array.out | 4 ++-- test/code/test_func_list.out | 4 ++++ test/code/test_func_list.php | 11 +++++++++++ test/code/test_print_r.out | 8 ++++---- test/code/test_unset.out | 4 ++-- test/ephp_code_test.erl | 1 + 6 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 test/code/test_func_list.out create mode 100644 test/code/test_func_list.php diff --git a/test/code/test_array.out b/test/code/test_array.out index daa1340b..15ce3590 100644 --- a/test/code/test_array.out +++ b/test/code/test_array.out @@ -6,10 +6,10 @@ $base => Array [3] => 4 [4] => 5 [5] => Array - ( + ( [0] => 8 [1] => 9 - ) + ) ) is 1 in array $base? yes is 8 in array $base? no diff --git a/test/code/test_func_list.out b/test/code/test_func_list.out new file mode 100644 index 00000000..3e7e8f9c --- /dev/null +++ b/test/code/test_func_list.out @@ -0,0 +1,4 @@ +great! number of internal functions is greater than 10 +great! there are not user functions registered yet +bool(true) +bool(false) diff --git a/test/code/test_func_list.php b/test/code/test_func_list.php new file mode 100644 index 00000000..f72e91d9 --- /dev/null +++ b/test/code/test_func_list.php @@ -0,0 +1,11 @@ + 10) { + print "great! number of internal functions is greater than 10\n"; +} +if (count($functions['user']) == 0) { + print "great! there are not user functions registered yet\n"; +} +var_dump(function_exists("strlen")); +var_dump(function_exists("function_not_exists_never")); diff --git a/test/code/test_print_r.out b/test/code/test_print_r.out index 588707fc..b7676699 100644 --- a/test/code/test_print_r.out +++ b/test/code/test_print_r.out @@ -6,15 +6,15 @@
Array
 (
     [0] => Array
-    (
+        (
             [name] => Manuel
             [surname] => Rubio
-    )
+        )
     [1] => Array
-    (
+        (
             [name] => Margarita
             [surname] => Ortiz
-    )
+        )
 )
 
diff --git a/test/code/test_unset.out b/test/code/test_unset.out index 51ba0a2c..09e965dd 100644 --- a/test/code/test_unset.out +++ b/test/code/test_unset.out @@ -6,10 +6,10 @@
Array
 (
     [0] => Array
-    (
+        (
             [name] => Manuel
             [surname] => Rubio
-    )
+        )
 )
 
diff --git a/test/ephp_code_test.erl b/test/ephp_code_test.erl index 776b1fb1..3e4e951d 100644 --- a/test/ephp_code_test.erl +++ b/test/ephp_code_test.erl @@ -56,6 +56,7 @@ code_to_test_() -> "test_function_refs", "test_func_var_dump", "test_func_icase", + "test_func_list", "test_literal", "test_print_true", "test_include",