aboutsummaryrefslogtreecommitdiff
path: root/ruby/version_spec_TEST.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ruby/version_spec_TEST.rb')
-rw-r--r--ruby/version_spec_TEST.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/ruby/version_spec_TEST.rb b/ruby/version_spec_TEST.rb
index 6ca2bd8f0..2e79786f4 100644
--- a/ruby/version_spec_TEST.rb
+++ b/ruby/version_spec_TEST.rb
@@ -31,6 +31,10 @@ class Paludis
assert_raise TypeError do
v = VersionSpec.new(0)
end
+
+ assert_raise BadVersionSpecError do
+ v = VersionSpec.new("1.0-r1-x")
+ end
end
def test_compare
@@ -51,6 +55,14 @@ class Paludis
def test_to_s
assert_equal "0.1_alpha2", VersionSpec.new("0.1_alpha2").to_s
end
+
+ def test_remove_revision
+ assert_equal VersionSpec.new('0.1'), VersionSpec.new('0.1-r1').remove_revision
+ end
+
+ def test_version_only
+ assert_equal 'r9', VersionSpec.new('0.1-r9').revision_only
+ end
end
end