summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test.py b/test.py
index 2433256..ddf1bf4 100644
--- a/test.py
+++ b/test.py
@@ -351,6 +351,13 @@ class TestCommandParams(unittest.TestCase):
self.assertEqual(err.exception.code, 2)
self.assertIn("Input strings and --stdin cannot work together", cse.getvalue())
+ def test_multivalued_options_with_text(self):
+ text = "the quick brown fox jumps over the lazy dog in a hurry"
+ cli_args = "--stopwords the in a hurry -- {}".format(text).split()
+ params = self.get_params_from_cli(*cli_args)
+ self.assertEqual(params['text'], text)
+ self.assertEqual(params['stopwords'], ['the', 'in', 'a', 'hurry'])
+
if __name__ == '__main__':
unittest.main()