Skip to content

Commit 158ec2c

Browse files
committed
Test if specifying both file and -c gives an error
1 parent 4de7fa2 commit 158ec2c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/test_utility.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ def test_encoding_error(self):
4444
self.assertRegex(err, r)
4545
self.assertEqual(rc, 1)
4646

47+
def test_file_and_commandline(self):
48+
out, err, rc = run(['-c', 'foo', 'bar'])
49+
50+
r = re.compile(r"^Can't use both FILE and -c option$", re.M)
51+
self.assertRegex(err, r)
52+
self.assertEqual(rc, 1)
53+
4754
def test_file_specified_encoding(self):
4855
f = temp(self.TEST_UNICODE.encode('sjis'))
4956

0 commit comments

Comments
 (0)