xezat 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -5
- data/.gitmodules +3 -3
- data/.rspec +2 -0
- data/.travis.yml +5 -3
- data/Gemfile +3 -1
- data/LICENSE.txt +17 -18
- data/README.md +9 -236
- data/Rakefile +4 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/xezat +16 -0
- data/lib/xezat.rb +9 -5
- data/lib/xezat/command/bump.rb +89 -110
- data/lib/xezat/command/debug.rb +13 -20
- data/lib/xezat/command/doctor.rb +9 -19
- data/lib/xezat/command/generate.rb +7 -111
- data/lib/xezat/command/init.rb +77 -0
- data/lib/xezat/command/port.rb +25 -44
- data/lib/xezat/config.rb +14 -0
- data/lib/xezat/cygchangelog.rb +7 -6
- data/lib/xezat/cygclasses.rb +10 -15
- data/lib/xezat/cygversion.rb +2 -3
- data/lib/xezat/debugger/linguist.rb +31 -0
- data/lib/xezat/debugger/variable.rb +18 -0
- data/lib/xezat/detector/autoconf.rb +1 -4
- data/lib/xezat/detector/automake.rb +1 -4
- data/lib/xezat/detector/boost.m4.rb +4 -8
- data/lib/xezat/detector/cmake.rb +2 -5
- data/lib/xezat/detector/gengetopt.rb +1 -4
- data/lib/xezat/detector/gnulib.rb +14 -0
- data/lib/xezat/detector/gobject-introspection.rb +2 -12
- data/lib/xezat/detector/halibut.rb +1 -4
- data/lib/xezat/detector/libQt5Core-devel.rb +1 -12
- data/lib/xezat/detector/libtool.rb +1 -4
- data/lib/xezat/detector/make.rb +4 -6
- data/lib/xezat/detector/meson.rb +9 -0
- data/lib/xezat/detector/ninja.rb +14 -0
- data/lib/xezat/detector/python-docutils.rb +4 -8
- data/lib/xezat/detector/roundup.rb +14 -0
- data/lib/xezat/detector/waf.rb +9 -0
- data/lib/xezat/detectors.rb +6 -23
- data/lib/xezat/ext/linguist/file_blob.rb +13 -0
- data/lib/xezat/generator/pkgconfig.rb +90 -0
- data/lib/xezat/main.rb +59 -9
- data/lib/xezat/packages.rb +8 -17
- data/lib/xezat/variables.rb +10 -37
- data/lib/xezat/version.rb +1 -1
- data/share/xezat/compilers.json +13 -1
- data/share/xezat/languages.json +12 -0
- data/share/xezat/repository/bitbucket.json +3 -3
- data/share/xezat/repository/github.json +3 -3
- data/share/xezat/repository/savannah.json +1 -1
- data/share/xezat/repository/sourceforge.json +1 -1
- data/share/xezat/template/cmake.erb +7 -0
- data/share/xezat/template/cygport.erb +12 -12
- data/share/xezat/template/pkgconfig.erb +1 -1
- data/xezat.gemspec +25 -21
- metadata +70 -171
- data/bin/xezat +0 -14
- data/lib/xezat/command/create.rb +0 -105
- data/lib/xezat/command/validate.rb +0 -43
- data/lib/xezat/commands.rb +0 -32
- data/lib/xezat/refine/linguist/file_blob.rb +0 -14
- data/lib/xezat/validator/m4.rb +0 -31
- data/lib/xezat/validator/pkgconfig.rb +0 -36
- data/lib/xezat/validators.rb +0 -38
- data/share/xezat/repository/google.json +0 -7
- data/share/xezat/show_cygport_description.sh +0 -8
- data/share/xezat/template/pkgconfig.cmake +0 -8
- data/share/xezat/template/setup.erb +0 -17
- data/test/test.rb +0 -25
- data/test/xezat/command/fixture/doctor/a.lst.gz +0 -0
- data/test/xezat/command/fixture/doctor/b1.lst.gz +0 -0
- data/test/xezat/command/fixture/doctor/b2.lst.gz +0 -0
- data/test/xezat/command/test_bump.rb +0 -25
- data/test/xezat/command/test_create.rb +0 -48
- data/test/xezat/command/test_doctor.rb +0 -17
- data/test/xezat/detector/fixture/autoconf/no/configure.scan +0 -1
- data/test/xezat/detector/fixture/autoconf/yes_root/configure.ac +0 -1
- data/test/xezat/detector/fixture/autoconf/yes_subdir/subdir/configure.ac +0 -1
- data/test/xezat/detector/fixture/automake/no/Makefile.in +0 -1
- data/test/xezat/detector/fixture/automake/yes_root/Makefile.am +0 -1
- data/test/xezat/detector/fixture/automake/yes_subdir/subdir/Makefile.am +0 -1
- data/test/xezat/detector/fixture/boost.m4/no/configure.ac +0 -1
- data/test/xezat/detector/fixture/boost.m4/yes/configure.ac +0 -1
- data/test/xezat/detector/fixture/cmake/no/CMakeList.txt +0 -1
- data/test/xezat/detector/fixture/cmake/yes_root/CMakeLists.txt +0 -1
- data/test/xezat/detector/fixture/cmake/yes_subdir/subdir/CMakeLists.txt +0 -1
- data/test/xezat/detector/fixture/gengetopt/no/xezat.log +0 -1
- data/test/xezat/detector/fixture/gengetopt/yes_root/xezat.ggo +0 -1
- data/test/xezat/detector/fixture/gengetopt/yes_subdir/subdir/xezat.ggo +0 -1
- data/test/xezat/detector/fixture/gobject-introspection/no/configure.ac +0 -1
- data/test/xezat/detector/fixture/gobject-introspection/yes/configure.ac +0 -1
- data/test/xezat/detector/fixture/halibut/no/halibut.txt +0 -1
- data/test/xezat/detector/fixture/halibut/yes_root/halibut.but +0 -1
- data/test/xezat/detector/fixture/halibut/yes_subdir/subdir/halibut.but +0 -1
- data/test/xezat/detector/fixture/libQt5Core-devel/no/foo.cygport +0 -1
- data/test/xezat/detector/fixture/libQt5Core-devel/yes_cygport/foo.cygport +0 -1
- data/test/xezat/detector/fixture/libQt5Core-devel/yes_dir/foo.cygport +0 -1
- data/test/xezat/detector/fixture/libQt5Core-devel/yes_dir/foo.pro +0 -1
- data/test/xezat/detector/fixture/python-docutils/no/configure.ac +0 -1
- data/test/xezat/detector/fixture/python-docutils/yes/configure.ac +0 -1
- data/test/xezat/detector/test_autoconf.rb +0 -24
- data/test/xezat/detector/test_automake.rb +0 -24
- data/test/xezat/detector/test_boost.m4.rb +0 -20
- data/test/xezat/detector/test_cmake.rb +0 -24
- data/test/xezat/detector/test_gengetopt.rb +0 -24
- data/test/xezat/detector/test_gobject-introspection.rb +0 -20
- data/test/xezat/detector/test_halibut.rb +0 -24
- data/test/xezat/detector/test_libQt5Core-devel.rb +0 -30
- data/test/xezat/detector/test_python-docutils.rb +0 -20
- data/test/xezat/test_cygchangelog.rb +0 -26
- data/test/xezat/test_cygclasses.rb +0 -32
- data/test/xezat/test_cygversion.rb +0 -47
- data/test/xezat/test_variables.rb +0 -16
- data/test/xezat/validator/fixture/m4/no/usr/share/aclocal/.gitkeep +0 -0
- data/test/xezat/validator/fixture/m4/yes/usr/share/aclocal/test.m4 +0 -1
- data/test/xezat/validator/fixture/pkgconfig/no_at/usr/lib/pkgconfig/xezat.pc +0 -11
- data/test/xezat/validator/fixture/pkgconfig/no_link/usr/lib/pkgconfig/xezat.pc +0 -11
- data/test/xezat/validator/fixture/pkgconfig/skip/usr/lib/pkgconfig/.gitkeep +0 -0
- data/test/xezat/validator/fixture/pkgconfig/yes/usr/lib/pkgconfig/xezat.pc +0 -10
- data/test/xezat/validator/test_m4.rb +0 -24
- data/test/xezat/validator/test_pkgconfig.rb +0 -31
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'xezat/command/doctor'
|
2
|
-
require 'zlib'
|
3
|
-
|
4
|
-
module Xezat::Test::Command
|
5
|
-
class DoctorTest < Test::Unit::TestCase
|
6
|
-
include Xezat::Command
|
7
|
-
include Xezat
|
8
|
-
|
9
|
-
def setup
|
10
|
-
@command = CommandManager[:doctor]
|
11
|
-
end
|
12
|
-
|
13
|
-
def test_get_contents_uniqueness
|
14
|
-
assert_equal({:"usr/bin/aaa" => [:a], :"usr/bin/bbb" => [:b1, :b2], :"usr/bin/ccc" => [:b2]}, @command.get_contents_uniqueness(File::join(File.dirname(__FILE__), 'fixture', 'doctor')))
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
AX_BOOST
|
@@ -1 +0,0 @@
|
|
1
|
-
BOOST_REQUIRE
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
AX_BOOST
|
@@ -1 +0,0 @@
|
|
1
|
-
GOBJECT_INTROSPECTION_CHECK
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
inherit qt5-qmake
|
@@ -1 +0,0 @@
|
|
1
|
-
inherit qt4-qmake
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
AC_MSG_RESULT([All man pages found. We don't need rst2man!])
|
@@ -1 +0,0 @@
|
|
1
|
-
AC_CHECK_PROGS([RST2MAN], [rst2man rst2man.py], [])
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'xezat/detectors'
|
2
|
-
|
3
|
-
module Xezat::Test::Detector
|
4
|
-
class AutoconfTest < Test::Unit::TestCase
|
5
|
-
include Xezat::Detector
|
6
|
-
include Xezat
|
7
|
-
|
8
|
-
def setup
|
9
|
-
@detector = DetectorManager[:autoconf]
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_yes_root
|
13
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'autoconf', 'yes_root')}))
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_yes_subdir
|
17
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'autoconf', 'yes_subdir')}))
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_no
|
21
|
-
assert_false(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'autoconf', 'no')}))
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'xezat/detectors'
|
2
|
-
|
3
|
-
module Xezat::Test::Detector
|
4
|
-
class AutomakeTest < Test::Unit::TestCase
|
5
|
-
include Xezat::Detector
|
6
|
-
include Xezat
|
7
|
-
|
8
|
-
def setup
|
9
|
-
@detector = DetectorManager[:automake]
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_yes_root
|
13
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'automake', 'yes_root')}))
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_yes_subdir
|
17
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'automake', 'yes_subdir')}))
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_no
|
21
|
-
assert_false(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'automake', 'no')}))
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'xezat/detectors'
|
2
|
-
|
3
|
-
module Xezat::Test::Detector
|
4
|
-
class BoostM4Test < Test::Unit::TestCase
|
5
|
-
include Xezat::Detector
|
6
|
-
include Xezat
|
7
|
-
|
8
|
-
def setup
|
9
|
-
@detector = DetectorManager[:'boost.m4']
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_yes
|
13
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'boost.m4', 'yes')}))
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_no
|
17
|
-
assert_false(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'boost.m4', 'no')}))
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'xezat/detectors'
|
2
|
-
|
3
|
-
module Xezat::Test::Detector
|
4
|
-
class CmakeTest < Test::Unit::TestCase
|
5
|
-
include Xezat::Detector
|
6
|
-
include Xezat
|
7
|
-
|
8
|
-
def setup
|
9
|
-
@detector = DetectorManager[:cmake]
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_yes_root
|
13
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'cmake', 'yes_root')}))
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_yes_subdir
|
17
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'cmake', 'yes_subdir')}))
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_no
|
21
|
-
assert_false(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'cmake', 'no')}))
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'xezat/detectors'
|
2
|
-
|
3
|
-
module Xezat::Test::Detector
|
4
|
-
class GengetoptTest < Test::Unit::TestCase
|
5
|
-
include Xezat::Detector
|
6
|
-
include Xezat
|
7
|
-
|
8
|
-
def setup
|
9
|
-
@detector = DetectorManager[:gengetopt]
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_yes_root
|
13
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'gengetopt', 'yes_root')}))
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_yes_subdir
|
17
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'gengetopt', 'yes_subdir')}))
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_no
|
21
|
-
assert_false(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'gengetopt', 'no')}))
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'xezat/detectors'
|
2
|
-
|
3
|
-
module Xezat::Test::Detector
|
4
|
-
class GObjectIntrospectiontest < Test::Unit::TestCase
|
5
|
-
include Xezat::Detector
|
6
|
-
include Xezat
|
7
|
-
|
8
|
-
def setup
|
9
|
-
@detector = DetectorManager[:'gobject-introspection']
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_yes
|
13
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'gobject-introspection', 'yes')}))
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_no
|
17
|
-
assert_false(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'gobject-introspection', 'no')}))
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'xezat/detectors'
|
2
|
-
|
3
|
-
module Xezat::Test::Detector
|
4
|
-
class HalibutTest < Test::Unit::TestCase
|
5
|
-
include Xezat::Detector
|
6
|
-
include Xezat
|
7
|
-
|
8
|
-
def setup
|
9
|
-
@detector = DetectorManager[:halibut]
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_yes_root
|
13
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'halibut', 'yes_root')}))
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_yes_subdir
|
17
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'halibut', 'yes_subdir')}))
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_no
|
21
|
-
assert_false(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'halibut', 'no')}))
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
require 'xezat/detectors'
|
2
|
-
|
3
|
-
module Xezat::Test::Detector
|
4
|
-
class LibQt5CoreDevel < Test::Unit::TestCase
|
5
|
-
include Xezat::Detector
|
6
|
-
include Xezat
|
7
|
-
|
8
|
-
def setup
|
9
|
-
@detector = DetectorManager[:'libQt5Core-devel']
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_yes_cygport
|
13
|
-
top = File::join(File::dirname(__FILE__), 'fixture', 'libQt5Core-devel', 'yes_cygport')
|
14
|
-
cygport = 'foo.cygport'
|
15
|
-
assert_true(@detector.detect({top: top, cygportfile: cygport, S: top, PN: 'foo'}))
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_yes_dir
|
19
|
-
top = File::join(File::dirname(__FILE__), 'fixture', 'libQt5Core-devel', 'yes_dir')
|
20
|
-
cygport = 'foo.cygport'
|
21
|
-
assert_true(@detector.detect({top: top, cygportfile: cygport, S: top, PN: 'foo'}))
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_no
|
25
|
-
top = File::join(File::dirname(__FILE__), 'fixture', 'libQt5Core-devel', 'no')
|
26
|
-
cygport = 'foo.cygport'
|
27
|
-
assert_false(@detector.detect({top: top, cygportfile: cygport, S: top, PN: 'foo'}))
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'xezat/detectors'
|
2
|
-
|
3
|
-
module Xezat::Test::Detector
|
4
|
-
class PythonDocutilsTest < Test::Unit::TestCase
|
5
|
-
include Xezat::Detector
|
6
|
-
include Xezat
|
7
|
-
|
8
|
-
def setup
|
9
|
-
@detector = DetectorManager[:'python-docutils']
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_yes
|
13
|
-
assert_true(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'python-docutils', 'yes')}))
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_no
|
17
|
-
assert_false(@detector.detect({S: File::join(File::dirname(__FILE__), 'fixture', 'python-docutils', 'no')}))
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'xezat/cygchangelog'
|
2
|
-
|
3
|
-
module Xezat::Test
|
4
|
-
class CygchangelogTest < Test::Unit::TestCase
|
5
|
-
include Xezat
|
6
|
-
|
7
|
-
def test_initialize
|
8
|
-
changelog = Cygchangelog.new(<<EOF
|
9
|
-
Port Notes:
|
10
|
-
|
11
|
-
----- version 2.0.0-1bl2 -----
|
12
|
-
Rebuild for xezat
|
13
|
-
next line
|
14
|
-
|
15
|
-
----- version 2.0.0-1bl1 -----
|
16
|
-
Version bump.
|
17
|
-
|
18
|
-
----- version 1.0.0-1bl1 -----
|
19
|
-
Initial release by fd0 <https://github.com/fd00/>
|
20
|
-
|
21
|
-
EOF
|
22
|
-
)
|
23
|
-
assert_equal(['Rebuild for xezat', 'next line'].join($/), changelog[:'2.0.0-1bl2'])
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'xezat/cygclasses'
|
2
|
-
|
3
|
-
module Xezat::Test
|
4
|
-
class CygclassesTest < Test::Unit::TestCase
|
5
|
-
include Xezat
|
6
|
-
|
7
|
-
def setup
|
8
|
-
@cygclass_manager = CygclassManager.new(File.join(File.dirname(__FILE__), '..', 'cygport', 'cygclass'))
|
9
|
-
end
|
10
|
-
|
11
|
-
# 存在している cygclass
|
12
|
-
def test_existent_cygclass
|
13
|
-
assert_equal(true, @cygclass_manager.include?(:svn))
|
14
|
-
end
|
15
|
-
|
16
|
-
# 存在しない cygclass
|
17
|
-
def test_nonexistent_cygclass
|
18
|
-
assert_equal(false, @cygclass_manager.include?(:nonexistent))
|
19
|
-
end
|
20
|
-
|
21
|
-
# vcs である cygclass
|
22
|
-
def test_vcs_cygclass
|
23
|
-
assert_equal(true, @cygclass_manager.vcs?(:git))
|
24
|
-
end
|
25
|
-
|
26
|
-
# 存在しているが vcs ではない cygclass
|
27
|
-
def test_novcs_cygclass
|
28
|
-
assert_equal(false, @cygclass_manager.vcs?(:cmake))
|
29
|
-
end
|
30
|
-
|
31
|
-
end
|
32
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
require 'xezat/cygversion'
|
2
|
-
|
3
|
-
module Xezat::Test
|
4
|
-
class CygversionTest < Test::Unit::TestCase
|
5
|
-
include Xezat
|
6
|
-
|
7
|
-
def test_initialize
|
8
|
-
cygversion = Cygversion.new('1.0.0-1bl1')
|
9
|
-
assert_equal(['1.0.0', 19700101, '1bl1'], cygversion.to_a)
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_initialize_vcs
|
13
|
-
cygversion = Cygversion.new('1.0.0+git20150101-1bl1')
|
14
|
-
assert_equal(['1.0.0', 20150101, '1bl1'], cygversion.to_a)
|
15
|
-
end
|
16
|
-
|
17
|
-
def test_compare
|
18
|
-
cygversion_old = Cygversion.new('1.0.0-1bl1')
|
19
|
-
cygversion_new = Cygversion.new('1.0.1-1bl1')
|
20
|
-
assert_equal(-1, cygversion_old <=> cygversion_new)
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_compare_git
|
24
|
-
cygversion_old = Cygversion.new('1.0.0+git20140101-1bl1')
|
25
|
-
cygversion_new = Cygversion.new('1.0.0+git20150101-1bl1')
|
26
|
-
assert_equal(-1, cygversion_old <=> cygversion_new)
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_compare_svn
|
30
|
-
cygversion_old = Cygversion.new('1.0.0+svn999-1bl1')
|
31
|
-
cygversion_new = Cygversion.new('1.0.0+svn1000-1bl1')
|
32
|
-
assert_equal(-1, cygversion_old <=> cygversion_new)
|
33
|
-
end
|
34
|
-
|
35
|
-
def test_compare_novcs
|
36
|
-
cygversion_old = Cygversion.new('1.0.0-1bl1')
|
37
|
-
cygversion_new = Cygversion.new('1.0.0+git20150101-1bl1')
|
38
|
-
assert_equal(-1, cygversion_old <=> cygversion_new)
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_compare_release
|
42
|
-
cygversion_old = Cygversion.new('1.0.0+git20150101-1bl1')
|
43
|
-
cygversion_new = Cygversion.new('1.0.0+git20150101-1bl2')
|
44
|
-
assert_equal(-1, cygversion_old <=> cygversion_new)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'xezat/variables'
|
2
|
-
|
3
|
-
module Xezat::Test
|
4
|
-
class VariableManagerTest < Test::Unit::TestCase
|
5
|
-
include Xezat
|
6
|
-
|
7
|
-
def test_variable
|
8
|
-
variables = VariableManager.new(<<EOF
|
9
|
-
!ruby/sym HOMEPAGE: "https://github.com/fd00/xezat"
|
10
|
-
!ruby/sym GIT_URI: "https://github.com/fd00/xezat.git"
|
11
|
-
EOF
|
12
|
-
)
|
13
|
-
assert_equal('https://github.com/fd00/xezat', variables[:HOMEPAGE])
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|