summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_binhex.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_binhex.py')
-rw-r--r--Lib/test/test_binhex.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_binhex.py b/Lib/test/test_binhex.py
index 2f3d53a..c92cfac 100644
--- a/Lib/test/test_binhex.py
+++ b/Lib/test/test_binhex.py
@@ -45,6 +45,18 @@ class BinHexTestCase(unittest.TestCase):
self.assertRaises(binhex.Error, binhex.binhex, self.fname3, self.fname2)
+ def test_binhex_line_endings(self):
+ # bpo-29566: Ensure the line endings are those for macOS 9
+ with open(self.fname1, 'wb') as f:
+ f.write(self.DATA)
+
+ binhex.binhex(self.fname1, self.fname2)
+
+ with open(self.fname2, 'rb') as fp:
+ contents = fp.read()
+
+ self.assertNotIn(b'\n', contents)
+
def test_main():
support.run_unittest(BinHexTestCase)