File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,22 +58,22 @@ docker run \
5858 set -e
5959 set -u
6060 if [ -f \"\${1:-}\" ]; then
61- fail=0
62- printf \"[TEST] %s\" \"\${1}\"
61+ error=0
6362
6463 if script -e -c \"php \${1}\" /dev/null 2>&1 | grep -Ei \"core|segmentation|fatal|except|err|warn|notice\" 2>&1 >/dev/null; then
65- fail=1
66- fi
67- if ! php \"\${1}\" 2>&1 | grep -E \"^(OK|SKIP)$\" 2>&1 >/dev/null; then
68- fail=1
69- fi
70-
71- if [ \"\${fail}\" != \"0\" ]; then
7264 printf \"\\r[FAIL] %s\\n\" \"\${1}\"
7365 php \"\${1}\" || true
7466 exit 1
7567 else
76- printf \"\\r[OK] %s\\n\" \"\${1}\"
68+ if php \"\${1}\" 2>&1 | grep -E \"^(OK)$\" 2>&1 >/dev/null; then
69+ printf \"\\r[OK] %s\\n\" \"\${1}\"
70+ elif php \"\${1}\" 2>&1 | grep -E \"^(SKIP)$\" 2>&1 >/dev/null; then
71+ printf \"\\r[SKIP] %s\\n\" \"\${1}\"
72+ else
73+ printf \"\\r[FAIL] %s\\n\" \"\${1}\"
74+ php \"\${1}\" || true
75+ exit 1
76+ fi
7777 fi
7878 fi
7979
Original file line number Diff line number Diff line change 77ini_set ('display_errors ' , 1 );
88error_reporting (-1 );
99
10+ // FIXME: Currently disabled for PHP 7.3 and PHP 7.4
11+ if (PHP_MAJOR_VERSION == 7 ) {
12+ if (PHP_MINOR_VERSION == 3 || PHP_MINOR_VERSION == 4 ) {
13+ echo 'SKIP ' ;
14+ exit (0 );
15+ }
16+ }
1017
1118$ backend = 'aspell ' ;
1219
Original file line number Diff line number Diff line change 77ini_set ('display_errors ' , 1 );
88error_reporting (-1 );
99
10+ // FIXME: Currently disabled for PHP 7.3 and PHP 7.4
11+ if (PHP_MAJOR_VERSION == 7 ) {
12+ if (PHP_MINOR_VERSION == 3 || PHP_MINOR_VERSION == 4 ) {
13+ echo 'SKIP ' ;
14+ exit (0 );
15+ }
16+ }
1017
1118$ backend = 'hspell ' ;
1219
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * This page should print 'OK' if everything works,
4+ * 'FAIL' or nothing if an error occured.
5+ */
6+ ini_set ('display_startup_errors ' , 1 );
7+ ini_set ('display_errors ' , 1 );
8+ error_reporting (-1 );
9+
10+ // FIXME: Currently disabled for PHP 7.3 and PHP 7.4
11+ if (PHP_MAJOR_VERSION == 7 ) {
12+ if (PHP_MINOR_VERSION == 3 || PHP_MINOR_VERSION == 4 ) {
13+ echo 'SKIP ' ;
14+ exit (0 );
15+ }
16+ }
17+
18+ /**
19+ * IMPORTANT:
20+ * ----------
21+ * The Myspell backend has been renamed to Hunspell to match the upstream
22+ * project. Users with their own enchant.ordering files will need to change
23+ * "myspell" to "hunspell" (as of enchant 2.0)
24+ * https://github.com/AbiWord/enchant/blob/master/NEWS
25+ */
26+ // Only available since 5.4.0
27+ if (version_compare (PHP_VERSION , '7.3.0 ' , '< ' )) {
28+ echo 'SKIP ' ;
29+ exit (0 );
30+ }
31+
32+ $ backend = 'hunspell ' ;
33+
34+ $ tag = 'en_US ' ;
35+ if (($ r = enchant_broker_init ()) === FALSE ) {
36+ echo 'FAIL: enchant_broker_init() ' ;
37+ exit (1 );
38+ }
39+ if (($ bprovides = enchant_broker_describe ($ r )) === FALSE ) {
40+ echo 'FAIL: enchant_broker_describe() ' ;
41+ exit (1 );
42+ }
43+
44+ foreach ($ bprovides as $ be ) {
45+ if ($ be ['name ' ] == $ backend ) {
46+ echo 'OK ' ;
47+ exit (0 );
48+ }
49+ }
50+ echo 'FAIL: " ' . $ backend . '" not available ' ;
51+ exit (1 );
Original file line number Diff line number Diff line change 77ini_set ('display_errors ' , 1 );
88error_reporting (-1 );
99
10+ // FIXME: Currently disabled for PHP 7.3 and PHP 7.4
11+ if (PHP_MAJOR_VERSION == 7 ) {
12+ if (PHP_MINOR_VERSION == 3 || PHP_MINOR_VERSION == 4 ) {
13+ echo 'SKIP ' ;
14+ exit (0 );
15+ }
16+ }
17+
18+ // FIXME: Currently not available for PHP 8.0 and PHP 8.1
19+ if (PHP_MAJOR_VERSION == 8 ) {
20+ if (PHP_MINOR_VERSION == 0 || PHP_MINOR_VERSION == 1 ) {
21+ echo 'SKIP ' ;
22+ exit (0 );
23+ }
24+ }
25+
1026
1127$ backend = 'ispell ' ;
1228
Original file line number Diff line number Diff line change 77ini_set ('display_errors ' , 1 );
88error_reporting (-1 );
99
10+ // FIXME: Currently disabled for PHP 7.3 and PHP 7.4
11+ if (PHP_MAJOR_VERSION == 7 ) {
12+ if (PHP_MINOR_VERSION == 3 || PHP_MINOR_VERSION == 4 ) {
13+ echo 'SKIP ' ;
14+ exit (0 );
15+ }
16+ }
17+
18+ /**
19+ * IMPORTANT:
20+ * ----------
21+ * The Myspell backend has been renamed to Hunspell to match the upstream
22+ * project. Users with their own enchant.ordering files will need to change
23+ * "myspell" to "hunspell" (as of enchant 2.0)
24+ * https://github.com/AbiWord/enchant/blob/master/NEWS
25+ */
26+ // Only available since 5.4.0
27+ if (version_compare (PHP_VERSION , '7.3.0 ' , '>= ' )) {
28+ echo 'SKIP ' ;
29+ exit (0 );
30+ }
1031
1132$ backend = 'myspell ' ;
1233
You can’t perform that action at this time.
0 commit comments