Jelajahi Sumber

[ci] test StringTools.endsWith against unicode (closes #8980)

Aleksandr Kuzmenko 5 tahun lalu
induk
melakukan
d87551cec8
2 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 1 0
      extra/CHANGES.txt
  2. 1 0
      tests/unit/src/unitstd/StringTools.unit.hx

+ 1 - 0
extra/CHANGES.txt

@@ -4,6 +4,7 @@
 
 	all : fixed arguments ordering for @:structInit constructors (#9418)
 	all : fixed display/references completion server request for static fields (#9440)
+	cpp : fixed StringTools.endsWith() for unicode characters (#8980)
 	js/cpp : fixed catch var naming collision (#9413)
 	interp : fixed throwing `haxe.macro.Error` outside of a macro context (#9390)
 

+ 1 - 0
tests/unit/src/unitstd/StringTools.unit.hx

@@ -24,6 +24,7 @@ StringTools.endsWith("foo", "foo") == true;
 StringTools.endsWith("foo", "fooo") == false;
 StringTools.endsWith("foo", "") == true;
 StringTools.endsWith("", "") == true;
+StringTools.endsWith("μου\n","\n") == true;
 
 // isSpace
 StringTools.isSpace("", 0) == false;