ruby-rpm 1.2.4 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{ChangeLog → CHANGELOG.rdoc} +7 -0
- data/README.rdoc +40 -0
- data/ext/rpm/db.c +27 -27
- data/ext/rpm/dependency.c +5 -5
- data/ext/rpm/extconf.rb +1 -1
- data/ext/rpm/file.c +1 -1
- data/ext/rpm/package.c +40 -40
- data/ext/rpm/private.h +3 -4
- data/ext/rpm/rpm.c +15 -26
- data/ext/rpm/ruby-rpm.h +0 -2
- data/ext/rpm/source.c +2 -2
- data/ext/rpm/spec.c +5 -5
- data/ext/rpm/version.c +12 -12
- data/lib/rpm.rb +3 -1
- data/lib/rpm/version.rb +4 -0
- metadata +66 -41
- data/COPYING +0 -340
- data/NEWS +0 -20
- data/README +0 -38
- data/Rakefile +0 -111
- data/doc/refm.rd.ja +0 -913
- data/ext/rpm/MANIFEST +0 -13
- data/ext/rpm/extconf.h +0 -10
- data/install.rb +0 -1015
- data/spec/fedora/ruby-rpm.spec +0 -244
- data/tests/runner.rb +0 -15
- data/tests/test_db.rb +0 -58
- data/tests/test_dependency.rb +0 -29
- data/tests/test_file.rb +0 -13
- data/tests/test_rpm.rb +0 -13
- data/tests/test_source.rb +0 -31
- data/tests/test_ts.rb +0 -169
- data/tests/test_version.rb +0 -60
data/tests/test_version.rb
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
require 'test/unit'
|
2
|
-
require 'rpm'
|
3
|
-
|
4
|
-
class RPM_Version_Tests < Test::Unit::TestCase
|
5
|
-
def setup
|
6
|
-
@a = RPM::Version.new( '1.0.0-0.1m' )
|
7
|
-
@b = RPM::Version.new( '0.9.0-1m' )
|
8
|
-
@c = RPM::Version.new( '1.0.0-0.11m' )
|
9
|
-
@d = RPM::Version.new( '0.9.0-1m', 1)
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_version_compare
|
13
|
-
assert( @a > @b )
|
14
|
-
assert( @a < @c )
|
15
|
-
assert( @a < @d )
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_version_newer?
|
19
|
-
assert( @a.newer?(@b) )
|
20
|
-
assert( @c.newer?(@a) )
|
21
|
-
assert( @d.newer?(@a) )
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_version_older?
|
25
|
-
assert( @b.older?(@a) )
|
26
|
-
assert( @a.older?(@c) )
|
27
|
-
assert( @a.older?(@d) )
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_vre
|
31
|
-
assert_equal( '0.9.0', @d.v )
|
32
|
-
assert_equal( '1m', @d.r )
|
33
|
-
assert_equal( 1, @d.e )
|
34
|
-
end
|
35
|
-
|
36
|
-
def test_to_s
|
37
|
-
assert_equal( '0.9.0-1m', @b.to_s )
|
38
|
-
assert_equal( '0.9.0-1m', @d.to_s )
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_to_vre
|
42
|
-
assert_equal( '0.9.0-1m', @b.to_vre )
|
43
|
-
assert_equal( '1:0.9.0-1m', @d.to_vre )
|
44
|
-
end
|
45
|
-
|
46
|
-
def test_inspect
|
47
|
-
v = RPM::Version.new("1", "2", 3)
|
48
|
-
assert_equal(3, v.e)
|
49
|
-
assert_equal('#<RPM::Version v="1", r="2", e=3>', v.inspect)
|
50
|
-
end
|
51
|
-
|
52
|
-
def test_epoch_none_zero
|
53
|
-
v1 = RPM::Version.new("1-2")
|
54
|
-
v2 = RPM::Version.new("0:1-2")
|
55
|
-
assert_equal(nil, v1.e)
|
56
|
-
assert_equal(0, v2.e)
|
57
|
-
assert( v1 == v2 )
|
58
|
-
assert_equal(v1.hash, v2.hash)
|
59
|
-
end
|
60
|
-
end
|