edk2/BaseTools/Tests
Jordan Justen 8fb5a0cae3 BaseTools/Tests: Verify unsupported UTF-8 data is rejected
Surrogate pair characters can be encoded in UTF-8 files, but they are
not valid UCS-2 characters.

For example, this python interpreter code:
>>> import codecs
>>> codecs.encode(u'\ud801', 'utf-8')
'\xed\xa0\x81'

But, the range of 0xd800 - 0xdfff should be rejected as unicode code
points because they are reserved for the surrogate pair usage in
UTF-16 files.

We test that this case is rejected for UTF-8 with and without the
UTF-8 BOM.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17698 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-23 23:34:38 +00:00
..
CToolsTests.py Sync BaseTool trunk (version r2649) into EDKII BaseTools. 2014-01-27 05:23:15 +00:00
CheckPythonSyntax.py Sync BaseTool trunk (version r2649) into EDKII BaseTools. 2014-01-27 05:23:15 +00:00
CheckUnicodeSourceFiles.py BaseTools/Tests: Verify unsupported UTF-8 data is rejected 2015-06-23 23:34:38 +00:00
GNUmakefile Sync BaseTool trunk (version r2599) into EDKII BaseTools. 2013-08-23 02:18:16 +00:00
PythonToolsTests.py BaseTools/Tests: Add unit test for AutoGen.UniClassObject 2015-06-23 23:34:14 +00:00
RunTests.py BaseTools/Tests: Always add BaseTools source to import path 2015-06-23 23:34:04 +00:00
TestTools.py BaseTools/Tests: Always add BaseTools source to import path 2015-06-23 23:34:04 +00:00
TianoCompress.py Sync BaseTool trunk (version r2649) into EDKII BaseTools. 2014-01-27 05:23:15 +00:00