From 10daf4c45f9553ebe86b32d76446d2b532520c4b Mon Sep 17 00:00:00 2001 From: Spencer Young Date: Tue, 24 Mar 2020 22:12:22 -0700 Subject: [PATCH] add files with boms to test dir --- tests/test_cli.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_cli.py b/tests/test_cli.py index 517bc62..1c497fe 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -91,6 +91,10 @@ class CommandLineTestCase(unittest.TestCase): # dos line endings yaml 'dos.yml': '---\r\n' 'dos: true', + # UTF-16 BOM + 'non-ascii/utf16': b'\xff\xfe---\nutf16: true\n', + #UTF-8 BOM + 'non-ascii/utf8': b'\xef\xbb\xbf---\nutf8: true\n', }) @classmethod @@ -171,6 +175,8 @@ class CommandLineTestCase(unittest.TestCase): os.path.join(self.wd, 'dos.yml'), os.path.join(self.wd, 'empty.yml'), os.path.join(self.wd, 'no-yaml.json'), + os.path.join(self.wd, 'non-ascii/utf16'), + os.path.join(self.wd, 'non-ascii/utf8'), os.path.join(self.wd, 'non-ascii/éçäγλνπ¥/utf-8'), os.path.join(self.wd, 's/s/s/s/s/s/s/s/s/s/s/s/s/s/s/file.yaml'), os.path.join(self.wd, 'sub/ok.yaml'), @@ -188,6 +194,8 @@ class CommandLineTestCase(unittest.TestCase): os.path.join(self.wd, 'dos.yml'), os.path.join(self.wd, 'empty.yml'), os.path.join(self.wd, 'no-yaml.json'), + os.path.join(self.wd, 'non-ascii/utf16'), + os.path.join(self.wd, 'non-ascii/utf8'), os.path.join(self.wd, 'non-ascii/éçäγλνπ¥/utf-8'), os.path.join(self.wd, 's/s/s/s/s/s/s/s/s/s/s/s/s/s/s/file.yaml'), os.path.join(self.wd, 'sub/ok.yaml'),