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'.
This commit is contained in:
parent
4192a2daa3
commit
10d60bd398
2 changed files with 17 additions and 5 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue