rant 0.4.0 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS +16 -0
- data/README +3 -2
- data/Rantfile +3 -4
- data/doc/advanced.rdoc +18 -13
- data/doc/examples/c_cpp_examples/Rantfile +37 -0
- data/doc/examples/c_cpp_examples/c/problem_1_1/another_test.c +6 -0
- data/doc/examples/c_cpp_examples/c/problem_1_1/another_test.h +7 -0
- data/doc/examples/c_cpp_examples/c/problem_1_1/main.c +12 -0
- data/doc/examples/c_cpp_examples/c/problem_1_1/test.c +6 -0
- data/doc/examples/c_cpp_examples/c/problem_1_1/test.h +7 -0
- data/doc/examples/c_cpp_examples/c/template.rf +21 -0
- data/doc/examples/c_cpp_examples/c++/problem_1_1/another_test.cpp +6 -0
- data/doc/examples/c_cpp_examples/c++/problem_1_1/another_test.h +5 -0
- data/doc/examples/c_cpp_examples/c++/problem_1_1/main.cpp +12 -0
- data/doc/examples/c_cpp_examples/c++/problem_1_1/test.cpp +6 -0
- data/doc/examples/c_cpp_examples/c++/problem_1_1/test.h +5 -0
- data/doc/examples/c_cpp_examples/c++/template.rf +21 -0
- data/doc/examples/c_cpp_examples/rule.rf +7 -0
- data/doc/rantfile.rdoc +1 -0
- data/lib/rant/archive/rubyzip/tempfile_bugfixed.rb +10 -8
- data/lib/rant/archive/rubyzip.rb +3 -8
- data/lib/rant/import/archive.rb +8 -4
- data/lib/rant/import/rubydoc.rb +1 -1
- data/lib/rant/import/rubytest.rb +12 -17
- data/lib/rant/import.rb +3 -2
- data/lib/rant/rantenv.rb +7 -4
- data/lib/rant/rantfile.rb +41 -21
- data/lib/rant/rantlib.rb +166 -113
- data/lib/rant/rantsys.rb +32 -17
- data/lib/rant/rantvar.rb +15 -15
- data/lib/rant/tempfile.rb +12 -0
- data/test/Rantfile +33 -0
- data/test/import/directedrule/test_directedrule.rb +29 -0
- data/test/import/package/Rantfile +2 -0
- data/test/import/package/test_package.rb +10 -0
- data/test/import/subfile/test_subfile.rb +21 -0
- data/test/project1/test_project.rb +10 -30
- data/test/project2/test_project.rb +1 -1
- data/test/project_rb1/test_project_rb1.rb +2 -1
- data/test/rant-import/test_rant-import.rb +35 -1
- data/test/subdirs/test_subdirs.rb +1 -2
- data/test/test_dirtask.rb +42 -0
- data/test/test_examples.rb +67 -0
- data/test/test_filelist.rb +52 -0
- data/test/test_rantfile_api.rb +59 -0
- data/test/ts_all.rb +1 -0
- metadata +25 -3
data/test/test_rantfile_api.rb
CHANGED
@@ -14,6 +14,8 @@ class TestRantfileAPI < Test::Unit::TestCase
|
|
14
14
|
end
|
15
15
|
def teardown
|
16
16
|
Dir.chdir $testDir
|
17
|
+
assert_rant("clean")
|
18
|
+
assert(!test(?e, "auto.rf"))
|
17
19
|
FileUtils.rm_rf Dir["*.t"]
|
18
20
|
end
|
19
21
|
def test_action
|
@@ -80,4 +82,61 @@ class TestRantfileAPI < Test::Unit::TestCase
|
|
80
82
|
assert_match(/2/, err)
|
81
83
|
assert_match(/n_i_x/, err)
|
82
84
|
end
|
85
|
+
def test_make_file
|
86
|
+
out, err = assert_rant("make_file")
|
87
|
+
assert(err.empty?)
|
88
|
+
assert(test(?f, "make_file.t"))
|
89
|
+
out, err = assert_rant("make_file")
|
90
|
+
assert(out.empty?)
|
91
|
+
assert(err.empty?)
|
92
|
+
end
|
93
|
+
def test_make_files
|
94
|
+
out, err = assert_rant("make_files=ON")
|
95
|
+
assert(err.empty?)
|
96
|
+
assert(test(?f, "make_files.t"))
|
97
|
+
assert(test(?f, "make_files_dep.t"))
|
98
|
+
out, err = assert_rant("make_files=ON")
|
99
|
+
assert(out.empty?)
|
100
|
+
end
|
101
|
+
def test_dep_on_make_files_fail
|
102
|
+
assert_rant(:fail, "dep_on_make_files")
|
103
|
+
assert(!test(?e, "make_files.t"))
|
104
|
+
assert(!test(?e, "make_files_dep.t"))
|
105
|
+
end
|
106
|
+
def test_dep_on_make_files
|
107
|
+
assert_rant("dep_on_make_files", "make_files=1")
|
108
|
+
assert(test(?e, "make_files.t"))
|
109
|
+
assert(test(?e, "make_files_dep.t"))
|
110
|
+
end
|
111
|
+
def test_make_path
|
112
|
+
out, err = assert_rant("make_path=1")
|
113
|
+
assert(err.empty?)
|
114
|
+
assert(test(?d, "basedir.t/a/b"))
|
115
|
+
out, err = assert_rant("make_path=1")
|
116
|
+
assert(out.empty?)
|
117
|
+
assert(err.empty?)
|
118
|
+
end
|
119
|
+
def test_make_subfile
|
120
|
+
out, err = assert_rant("make_gen_with_block=1")
|
121
|
+
assert(err.empty?)
|
122
|
+
assert(test(?f, "a.t/a.t"))
|
123
|
+
out, err = assert_rant("make_gen_with_block=1")
|
124
|
+
assert(out.empty?)
|
125
|
+
assert(err.empty?)
|
126
|
+
end
|
127
|
+
def test_source_self
|
128
|
+
open "source_self.t", "w" do |f|
|
129
|
+
f << <<-EOF
|
130
|
+
puts "test"
|
131
|
+
task :a
|
132
|
+
source "source_self.t"
|
133
|
+
EOF
|
134
|
+
end
|
135
|
+
out, err = nil, nil
|
136
|
+
th = Thread.new { out, err = assert_rant("-fsource_self.t") }
|
137
|
+
# OK, give it one second to complete
|
138
|
+
assert_equal(th, th.join(1))
|
139
|
+
assert_equal("test\n", out)
|
140
|
+
assert(err.empty?)
|
141
|
+
end
|
83
142
|
end
|
data/test/ts_all.rb
CHANGED
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.11
|
3
3
|
specification_version: 1
|
4
4
|
name: rant
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.4.
|
7
|
-
date: 2005-07-
|
6
|
+
version: 0.4.2
|
7
|
+
date: 2005-07-18 00:00:00 +02:00
|
8
8
|
summary: Rant is a Ruby based build tool.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -25,6 +25,8 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
25
25
|
version: 0.0.0
|
26
26
|
version:
|
27
27
|
platform: ruby
|
28
|
+
signing_key:
|
29
|
+
cert_chain:
|
28
30
|
authors:
|
29
31
|
-
|
30
32
|
- Stefan Lang
|
@@ -51,6 +53,7 @@ files:
|
|
51
53
|
- lib/rant/import
|
52
54
|
- lib/rant/plugin_methods.rb
|
53
55
|
- lib/rant/plugin
|
56
|
+
- lib/rant/tempfile.rb
|
54
57
|
- lib/rant/archive
|
55
58
|
- lib/rant/import.rb
|
56
59
|
- lib/rant/c/include.rb
|
@@ -206,9 +209,28 @@ files:
|
|
206
209
|
- doc/rant-import.rdoc
|
207
210
|
- doc/examples
|
208
211
|
- doc/package.rdoc
|
212
|
+
- doc/examples/c_cpp_examples
|
209
213
|
- doc/examples/directedrule
|
210
214
|
- doc/examples/myprog
|
211
215
|
- doc/examples/c_dependencies
|
216
|
+
- doc/examples/c_cpp_examples/c
|
217
|
+
- doc/examples/c_cpp_examples/c++
|
218
|
+
- doc/examples/c_cpp_examples/Rantfile
|
219
|
+
- doc/examples/c_cpp_examples/rule.rf
|
220
|
+
- doc/examples/c_cpp_examples/c/template.rf
|
221
|
+
- doc/examples/c_cpp_examples/c/problem_1_1
|
222
|
+
- doc/examples/c_cpp_examples/c/problem_1_1/main.c
|
223
|
+
- doc/examples/c_cpp_examples/c/problem_1_1/test.c
|
224
|
+
- doc/examples/c_cpp_examples/c/problem_1_1/test.h
|
225
|
+
- doc/examples/c_cpp_examples/c/problem_1_1/another_test.c
|
226
|
+
- doc/examples/c_cpp_examples/c/problem_1_1/another_test.h
|
227
|
+
- doc/examples/c_cpp_examples/c++/template.rf
|
228
|
+
- doc/examples/c_cpp_examples/c++/problem_1_1
|
229
|
+
- doc/examples/c_cpp_examples/c++/problem_1_1/main.cpp
|
230
|
+
- doc/examples/c_cpp_examples/c++/problem_1_1/test.cpp
|
231
|
+
- doc/examples/c_cpp_examples/c++/problem_1_1/another_test.cpp
|
232
|
+
- doc/examples/c_cpp_examples/c++/problem_1_1/test.h
|
233
|
+
- doc/examples/c_cpp_examples/c++/problem_1_1/another_test.h
|
212
234
|
- doc/examples/directedrule/src_a
|
213
235
|
- doc/examples/directedrule/src_b
|
214
236
|
- doc/examples/directedrule/Rantfile
|