blob: 7968d1e19eaac203bb69468e09d52f639c15e405 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
require 'testing_env'
require 'bottle_version'
class BottleVersionParsingTests < Test::Unit::TestCase
def assert_version_detected expected, path
assert_equal expected, BottleVersion.parse(path).to_s
end
def test_perforce_style
assert_version_detected '2013.1.610569-x86_64',
'/usr/local/perforce-2013.1.610569-x86_64.mountain_lion.bottle.tar.gz'
end
def test_ssh_copy_id_style
assert_version_detected '6.2p2',
'/usr/local/ssh-copy-id-6.2p2.mountain_lion.bottle.tar.gz'
end
def test_icu4c_style
assert_version_detected '52.1',
'/usr/local/icu4c-52.1.mavericks.bottle.tar.gz'
end
def test_x264_style
assert_version_detected 'r2197.4',
'/usr/local/x264-r2197.4.mavericks.bottle.tar.gz'
end
end
|