File tree Expand file tree Collapse file tree 2 files changed +10
-33
lines changed
Expand file tree Collapse file tree 2 files changed +10
-33
lines changed Original file line number Diff line number Diff line change 33BASE_PATH=" $( cd " $( dirname " $0 " ) /tests" && pwd) "
44RUN_TESTS_PATH=" $( cd " $( dirname " $0 " ) /../../" && pwd) /run-tests.php"
55PHP_EXECUTABLE=" $( cd " $( dirname " $0 " ) /../../" && pwd) /sapi/cli/php"
6+ export VALGRIND_OPTS=" --leak-check=full --track-origins=yes"
67
78if [ -z " $1 " ]; then
89 TEST_PATH=" $BASE_PATH "
910else
1011 TEST_PATH=" $BASE_PATH /$1 "
1112fi
1213
13- " $PHP_EXECUTABLE " " $RUN_TESTS_PATH " --show-diff -p " $PHP_EXECUTABLE " " $TEST_PATH "
14+ " $PHP_EXECUTABLE " " $RUN_TESTS_PATH " --show-diff -m - p " $PHP_EXECUTABLE " " $TEST_PATH "
Original file line number Diff line number Diff line change @@ -29,41 +29,17 @@ $coroutines = [
2929];
3030
3131$ result = awaitAnyOfWithErrors (2 , $ coroutines );
32- var_dump ($ result );
32+
33+ $ countOfResults = count ($ result [0 ]) >= 2 ? "OK " : "FALSE: " .count ($ result [0 ]);
34+ $ countOfErrors = count ($ result [1 ]) == 1 ? "OK " : "FALSE: " .count ($ result [1 ]);
35+
36+ echo "Count of results: $ countOfResults \n" ;
37+ echo "Count of errors: $ countOfErrors \n" ;
3338
3439echo "end \n" ;
3540?>
3641--EXPECTF--
3742start
38- array(2) {
39- [0]=>
40- array(2) {
41- [2]=>
42- string(5) "third"
43- [3]=>
44- string(6) "fourth"
45- }
46- [1]=>
47- array(1) {
48- [1]=>
49- object(RuntimeException)#%d (7) {
50- ["message":protected]=>
51- string(14) "test exception"
52- ["string":"Exception":private]=>
53- string(0) ""
54- ["code":protected]=>
55- int(0)
56- ["file":protected]=>
57- string(%d) "%s"
58- ["line":protected]=>
59- int(%d)
60- ["trace":"Exception":private]=>
61- array(%d) {
62- %a
63- }
64- ["previous":"Exception":private]=>
65- NULL
66- }
67- }
68- }
43+ Count of results: OK
44+ Count of errors: OK
6945end
You can’t perform that action at this time.
0 commit comments