add test of -h and --help

This commit is contained in:
Johan Holmberg 2016-09-26 23:51:15 +02:00
parent e6a9092783
commit e76dd95bcb

View File

@ -114,4 +114,16 @@ class CMDTEST_options < Cmdtest::Testcase
end
end
def test_option_help
cmd_cmdtest_verbose "-h" do
stdout_equal /^usage: cmdtest /
stdout_equal /^\s+-h, --help\s+show this help/
end
cmd_cmdtest_verbose "--help" do
stdout_equal /^usage: cmdtest /
stdout_equal /^\s+-h, --help\s+show this help/
end
end
end