diff options
Diffstat (limited to 'test/test_cmdline.py')
-rw-r--r-- | test/test_cmdline.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/test_cmdline.py b/test/test_cmdline.py index 06b3abc9..0a1d6e8f 100644 --- a/test/test_cmdline.py +++ b/test/test_cmdline.py @@ -14,7 +14,7 @@ def test_parse_replace_hook(): assert x == (".*", "bar", "voing") tutils.raises( - cmdline.ParseReplaceException, + cmdline.ParseException, cmdline.parse_replace_hook, "/foo" ) @@ -29,11 +29,17 @@ def test_parse_replace_hook(): "/~/foo/rep" ) tutils.raises( - "empty replacement regex", + "empty clause", cmdline.parse_replace_hook, "//" ) + +def test_parse_setheaders(): + x = cmdline.parse_replace_hook("/foo/bar/voing") + assert x == ("foo", "bar", "voing") + + def test_common(): parser = argparse.ArgumentParser() cmdline.common_options(parser) @@ -53,7 +59,7 @@ def test_common(): opts.replace = ["//"] tutils.raises( - "empty replacement regex", + "empty clause", cmdline.get_common_options, opts ) |