Skip to content

Commit 133bbe3

Browse files
committed
Add test for --verbose / -V option parsing
Locks in that -V is the short flag for --verbose so the prior duplication with --visibility cannot silently regress.
1 parent c60db09 commit 133bbe3

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/rdoc/rdoc_options_test.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,15 @@ def test_parse_visibility
697697
assert_equal :nodoc, @options.visibility
698698
end
699699

700+
def test_parse_verbose
701+
@options.parse %w[--verbose]
702+
assert_equal 2, @options.verbosity
703+
704+
@options = RDoc::Options.new
705+
@options.parse %w[-V]
706+
assert_equal 2, @options.verbosity
707+
end
708+
700709
def test_parse_write_options
701710
tmpdir = File.join Dir.tmpdir, "test_rdoc_options_#{$$}"
702711
FileUtils.mkdir_p tmpdir

0 commit comments

Comments
 (0)