diff --git a/tests/cases/Encoding/TestGB18030.php b/tests/cases/Encoding/TestGB18030.php index fee1755..f409094 100644 --- a/tests/cases/Encoding/TestGB18030.php +++ b/tests/cases/Encoding/TestGB18030.php @@ -28,7 +28,6 @@ class TestGB18030 extends \MensBeam\Intl\Test\CoderDecoderTest { protected $seekOffsets = [0, 1, 5, 7, 11, 15, 19, 23]; /* This string contains an invalid character sequence sandwiched between two null characters */ protected $brokenChar = "00 FF 00"; - protected $lowerA = "a"; public function tearDown() { $this->testedClass = GB18030::class; diff --git a/tests/cases/Encoding/TestSingleByte.php b/tests/cases/Encoding/TestSingleByte.php index 9fa61dc..4bbf5d8 100644 --- a/tests/cases/Encoding/TestSingleByte.php +++ b/tests/cases/Encoding/TestSingleByte.php @@ -80,7 +80,6 @@ class TestSingleByte extends \MensBeam\Intl\Test\CoderDecoderTest { protected $seekOffsets = [0, 1, 2, 3, 4, 5, 6, 7]; /* This string is supposed to contain an invalid character sequence sandwiched between two null characters; this is different for each single-byte encoding (and many do not have invalid characters) */ protected $brokenChar = ""; - protected $lowerA = "a"; /** * @dataProvider provideCodePoints diff --git a/tests/cases/Encoding/TestUTF8.php b/tests/cases/Encoding/TestUTF8.php index eaf0ab9..063104b 100644 --- a/tests/cases/Encoding/TestUTF8.php +++ b/tests/cases/Encoding/TestUTF8.php @@ -27,7 +27,6 @@ class TestUTF8 extends \MensBeam\Intl\Test\CoderDecoderTest { protected $seekOffsets = [0, 1, 3, 6, 10, 13, 17, 20]; /* This string contains an invalid character sequence sandwiched between two null characters */ protected $brokenChar = "00 FF 00"; - protected $lowerA = "a"; /** * @dataProvider provideCodePoints diff --git a/tests/cases/Encoding/TestXUserDefined.php b/tests/cases/Encoding/TestXUserDefined.php index 776fd08..85c915d 100644 --- a/tests/cases/Encoding/TestXUserDefined.php +++ b/tests/cases/Encoding/TestXUserDefined.php @@ -16,7 +16,6 @@ class TestXUserDefined extends \MensBeam\Intl\Test\DecoderTest { protected $seekOffsets = [0, 1, 2, 3, 4, 5, 6, 7]; /* This string is supposed to contain an invalid character sequence sandwiched between two null characters, but x-user-defined has no invalid characters */ protected $brokenChar = ""; - protected $lowerA = "a"; /** * @dataProvider provideStrings diff --git a/tests/lib/DecoderTest.php b/tests/lib/DecoderTest.php index 9ed5e69..4e43d8e 100644 --- a/tests/lib/DecoderTest.php +++ b/tests/lib/DecoderTest.php @@ -9,6 +9,7 @@ namespace MensBeam\Intl\Test; use MensBeam\Intl\Encoding\DecoderException; abstract class DecoderTest extends \PHPUnit\Framework\TestCase { + protected $lowerA = "a"; public function testDecodeMultipleCharactersAsCodePoints(string $input, array $exp) { $class = $this->testedClass; diff --git a/tools/test.js b/tools/test.js index 2b65348..b4fa8de 100644 --- a/tools/test.js +++ b/tools/test.js @@ -3,7 +3,7 @@ window.out = document.createElement("pre"); document.documentElement.appendChild(out); -var encoding = document.getElementsByTagName("meta").charset; +var encoding = document.getElementsByTagName("meta")[0].getAttribute("charset"); function encodeCodePoint(code, fatal) { if (code < 0 || code > 0x10FFFF) { @@ -132,6 +132,7 @@ if(typeof seekCodePoints != 'undefined') { for (let char of stats) { offs.push(char.offset); } + offs.push(end[1]); offs = 'protected $seekOffsets = [' + offs.join(", ") + "];\n"; // output the results out.appendChild(document.createTextNode(comment));