diff options
Diffstat (limited to 'test/rdoc/test_rdoc_options.rb')
-rw-r--r-- | test/rdoc/test_rdoc_options.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_options.rb b/test/rdoc/test_rdoc_options.rb index 62a5b2db54..f4a8d51c8e 100644 --- a/test/rdoc/test_rdoc_options.rb +++ b/test/rdoc/test_rdoc_options.rb @@ -50,5 +50,25 @@ class TestRDocOptions < MiniTest::Unit::TestCase assert_equal 'MAIN', @options.main_page end + def test_parse_dash_p + out, err = capture_io do + @options.parse %w[-p] + end + + assert @options.pipe + refute_match %r%^Usage: %, err + refute_match %r%^invalid options%, err + end + + def test_parse_dash_p_files + out, err = capture_io do + @options.parse %w[-p README] + end + + refute @options.pipe + refute_match %r%^Usage: %, err + assert_match %r%^invalid options: -p .with files.%, err + end + end |