Skip to content

Commit bf940a1

Browse files
committed
Add another test for SJIS-Mobile text conversion
1 parent 32df61c commit bf940a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/mbstring/tests/sjis_mobile_encodings.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,10 @@ function testSJISVariant($validChars, $nonInvertible, $encoding) {
290290
// flags, but in Unicode these are represented by a sequence of _two_ codepoints
291291
// So if only one of those two codepoints appears at the end of a string, it can't
292292
// be converted to SJIS and should be treated as an error
293-
convertInvalidString("\x00\x01\xF1\xE6", "%", "UTF-32BE", $encoding); // Regional Indicator A
293+
convertInvalidString("\x00\x01\xF1\xE9", "%", "UTF-32BE", $encoding); // Regional Indicator C
294+
295+
// Test Regional Indicator codepoint followed by some other codepoint
296+
convertInvalidString("\x00\x01\xF1\xE9\x00\x00\x00A", "%A", "UTF-32BE", $encoding);
294297
}
295298

296299
testSJISVariant($docomo, $nonInvertibleDocomo, 'SJIS-Mobile#DOCOMO');

0 commit comments

Comments
 (0)