From 72ce46a3b9d56861e8bcdc1257fa90780b1e5b8c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 9 Sep 2020 10:08:08 +0200 Subject: more fix for test suit --- php-pecl-trie.spec | 4 ++-- php_trie-build.patch | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/php-pecl-trie.spec b/php-pecl-trie.spec index 38df8bb..f8d43b2 100644 --- a/php-pecl-trie.spec +++ b/php-pecl-trie.spec @@ -188,7 +188,7 @@ TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php +%{__php} -n run-tests.php --show-diff %if %{with_zts} @@ -203,7 +203,7 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php +%{__ztsphp} -n run-tests.php --show-diff %endif diff --git a/php_trie-build.patch b/php_trie-build.patch index a834161..81ad235 100644 --- a/php_trie-build.patch +++ b/php_trie-build.patch @@ -161,3 +161,44 @@ index 5c7bb9e..4cdb86b 100644 + ["foo"]=> + string(3) "foo" } +From b97b49ea191760e27d366fc5a487cb4313b300d3 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 9 Sep 2020 10:04:21 +0200 +Subject: [PATCH] sort test result to avoid failure + +--- + tests/trie/map.phpt | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tests/trie/map.phpt b/tests/trie/map.phpt +index aedf9e8..8cb0df8 100644 +--- a/tests/trie/map.phpt ++++ b/tests/trie/map.phpt +@@ -7,19 +7,19 @@ $trie['foo'] = 'FOO'; + $trie['bar'] = 'BAR'; + $trie['baz'] = 'BAZ'; + +-var_dump( +- $trie ++$res = $trie + ->map('strtolower') + ->map('ucfirst') +- ->toArray() +-); ++ ->toArray(); ++ksort($res); ++var_dump($res); + ?> + --EXPECT-- + array(3) { +- ["foo"]=> +- string(3) "Foo" + ["bar"]=> + string(3) "Bar" + ["baz"]=> + string(3) "Baz" +-} +\ No newline at end of file ++ ["foo"]=> ++ string(3) "Foo" ++} -- cgit