summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-09-09 10:08:08 +0200
committerRemi Collet <remi@remirepo.net>2020-09-09 10:08:08 +0200
commit72ce46a3b9d56861e8bcdc1257fa90780b1e5b8c (patch)
tree0cdd16b72538a46d2195486307e173f5e13e0ec3
parent30b274e28490f1371c90322f6930583928f516c0 (diff)
more fix for test suit
-rw-r--r--php-pecl-trie.spec4
-rw-r--r--php_trie-build.patch41
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 <remi@remirepo.net>
+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"
++}