Skip to content

Commit

Permalink
Mark other dependencies on json to run tests
Browse files Browse the repository at this point in the history
GH workflows for setup-php isn't setting up the json extension for some
reason. It's optional in php < 8.0.

Mark a test as php 7.1+ only
  • Loading branch information
TysonAndre committed Oct 2, 2022
1 parent 2289e0b commit fa24e06
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/compat/001.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
Compat simdjson_decode() tests
--SKIPIF--
<?php if (PHP_VERSION_ID < 70100) echo "skip php 7.1+ only (empty string in object property name)\n";
--FILE--
<?php
function simdjson_compat_decode($v) {
Expand Down
2 changes: 1 addition & 1 deletion tests/compat/bug41067.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
Bug #41067 compat test (json_encode() problem with UTF-16 input)
Bug #41067 compat test
--FILE--
<?php
$json = '["\ud834\udd00"]';
Expand Down
2 changes: 2 additions & 0 deletions tests/compat/pass001.1.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
JSON (http://www.crockford.com/JSON/JSON_checker/test/pass1.json)
--SKIPIF--
<?php if (!function_exists('json_encode')) { echo "skip json_encode not available\n"; } ?>
--INI--
serialize_precision=-1
--FILE--
Expand Down
1 change: 1 addition & 0 deletions tests/compat/pass001.1_64bit.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ serialize_precision=-1
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
if (!function_exists('json_encode')) { echo "skip json_encode not available\n"; }
if (PHP_VERSION < 70100) die("skip this test is for php 7.1+ only");
?>
--FILE--
Expand Down
2 changes: 2 additions & 0 deletions tests/compat/pass001.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
JSON (http://www.crockford.com/JSON/JSON_checker/test/pass1.json)
--SKIPIF--
<?php if (!function_exists('json_encode')) { echo "skip json_encode not available\n"; } ?>
--INI--
serialize_precision=-1
--FILE--
Expand Down
2 changes: 2 additions & 0 deletions tests/compat/pass002.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
JSON (http://www.crockford.com/JSON/JSON_checker/test/pass2.json)
--SKIPIF--
<?php if (!function_exists('json_encode')) { echo "skip json_encode not available\n"; } ?>
--FILE--
<?php

Expand Down
2 changes: 2 additions & 0 deletions tests/compat/pass003.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
JSON (http://www.crockford.com/JSON/JSON_checker/test/pass3.json)
--SKIPIF--
<?php if (!function_exists('json_encode')) { echo "skip json_encode not available\n"; } ?>
--FILE--
<?php

Expand Down

0 comments on commit fa24e06

Please sign in to comment.