From 23f2db700575786bc111a28a963e2e240d90c534 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 29 Apr 2013 22:12:07 +0200 Subject: Mat now correctly handle empty files This is necessary beccause hachoir crashes on empty files... --- test/clitest.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/clitest.py') diff --git a/test/clitest.py b/test/clitest.py index bc0a7fd..d877698 100644 --- a/test/clitest.py +++ b/test/clitest.py @@ -94,6 +94,13 @@ class TestFileAttributes(unittest.TestCase): stdout, _ = proc.communicate() self.assertEqual(str(stdout).strip('\n'), 'Unable to process %s' % 'ilikecookies') + def test_empty(self): + ''' test MAT's behaviour on empty file''' + proc = subprocess.Popen(['../mat', 'empty_file'], + stdout=subprocess.PIPE) + stdout, _ = proc.communicate() + self.assertEqual(str(stdout).strip('\n'), 'Unable to process %s' % 'ilikecookies') + def get_tests(): ''' Return every clitests''' -- cgit v1.3