From 3aa76cc58e5a1f3b66c5537b6637931fd293bb2b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 7 Nov 2018 22:13:36 +0100 Subject: Prove that the previous commit is working --- tests/test_climat2.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test_climat2.py') diff --git a/tests/test_climat2.py b/tests/test_climat2.py index 53e4f5b..e17da86 100644 --- a/tests/test_climat2.py +++ b/tests/test_climat2.py @@ -174,3 +174,10 @@ class TestGetMeta(unittest.TestCase): self.assertIn(b'genre: Python', stdout) self.assertIn(b'i am a : various comment', stdout) self.assertIn(b'artist: jvoisin', stdout) + +class TestControlCharInjection(unittest.TestCase): + def test_jpg(self): + proc = subprocess.Popen(mat2_binary + ['--show', './tests/data/control_chars.jpg'], + stdout=subprocess.PIPE) + stdout, _ = proc.communicate() + self.assertIn(b'Comment: GQ\n', stdout) -- cgit v1.3