diff options
author | Georg Brandl <georg@python.org> | 2014-11-11 19:04:21 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-11-11 19:04:21 +0100 |
commit | 6ef0dc9af1f4343f9574a589058cb6d0fa01b8d8 (patch) | |
tree | 47b328ba9ec696a244e6801a195ac8e70a5257db | |
parent | 11cb778653a924bbb9d33644d6b0bfc46d3eec51 (diff) | |
download | pygments-6ef0dc9af1f4343f9574a589058cb6d0fa01b8d8.tar.gz |
Care for Windows newlines in stdout.
-rw-r--r-- | tests/test_cmdline.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index cf935152..e7014418 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -113,7 +113,7 @@ class CmdLineTest(unittest.TestCase): def test_stream_opt(self): o = self.check_success('-lpython', '-s', '-fterminal', stdin=TESTCODE) o = re.sub(r'\x1b\[.*?m', '', o) - self.assertEqual(o, TESTCODE) + self.assertEqual(o.replace('\r\n', '\n'), TESTCODE) def test_L_opt(self): o = self.check_success("-L") @@ -172,9 +172,9 @@ class CmdLineTest(unittest.TestCase): def test_N_opt(self): o = self.check_success("-N", "test.py") - self.assertEqual('python\n', o) + self.assertEqual('python', o.strip()) o = self.check_success("-N", "test.unknown") - self.assertEqual('text\n', o) + self.assertEqual('text', o.strip()) def test_invalid_opts(self): for opts in [("-L", "-lpy"), ("-L", "-fhtml"), ("-L", "-Ox"), |