summaryrefslogtreecommitdiff
path: root/test/optparse
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-26 03:41:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-26 03:41:04 +0000
commitdb1de35a3138ffecc6210a9dd5a26880390ef60a (patch)
tree6f18d0e1673845daaed75bca2d81136073ce1cac /test/optparse
parentf36688449b4ddbc07e3bfe4f0cd1297146b7ab3b (diff)
optparse.rb: froze string literals
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/optparse')
-rw-r--r--test/optparse/test_summary.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/optparse/test_summary.rb b/test/optparse/test_summary.rb
index b743aa0..2f389a3 100644
--- a/test/optparse/test_summary.rb
+++ b/test/optparse/test_summary.rb
@@ -44,4 +44,13 @@ class TestOptionParser::SummaryTest < TestOptionParser
assert_equal("foo bar\n", o.to_s, bug6348)
assert_equal(["foo bar"], o.to_a, bug6348)
end
+
+ def test_ver
+ o = OptionParser.new("foo bar")
+ o.program_name = "foo"
+ o.version = [0, 1]
+ assert_equal "foo 0.1", o.ver
+ o.release = "rel"
+ assert_equal "foo 0.1 (rel)", o.ver
+ end
end