From 10d60bd39822670c55b84cb9d13dce8aea78bc40 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Fri, 31 Aug 2018 21:33:42 -0400 Subject: add --unknown-members argument to mat2 This allows the user to make use of parser.unknown_member_policy for archive formats. At the suggestion of @jvoisin, it also prints a scary warning if the user explicitly chooses 'keep'. --- tests/test_climat2.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_climat2.py b/tests/test_climat2.py index af89c0e..6ee84d5 100644 --- a/tests/test_climat2.py +++ b/tests/test_climat2.py @@ -8,12 +8,14 @@ class TestHelp(unittest.TestCase): def test_help(self): proc = subprocess.Popen(['./mat2', '--help'], stdout=subprocess.PIPE) stdout, _ = proc.communicate() - self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-s | -L] [files [files ...]]', stdout) + self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-u POLICY] [-s | -L] [files [files ...]]', + stdout) def test_no_arg(self): proc = subprocess.Popen(['./mat2'], stdout=subprocess.PIPE) stdout, _ = proc.communicate() - self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-s | -L] [files [files ...]]', stdout) + self.assertIn(b'usage: mat2 [-h] [-v] [-l] [-c] [-V] [-u POLICY] [-s | -L] [files [files ...]]', + stdout) class TestVersion(unittest.TestCase): -- cgit v1.3