runtex 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/Code_zum_Pluendern_rtex4newrtex.rb +275 -0
- data/lib/catch_output.rb +99 -0
- data/lib/runtex.rb +221 -0
- data/lib/runtex_bibtex.rb +111 -0
- data/lib/runtex_job_chain.rb +371 -0
- data/lib/runtex_latex.rb +373 -0
- data/lib/runtex_makeindex.rb +114 -0
- data/lib/runtex_pathes.yaml +59 -0
- data/lib/runtex_rail.rb +116 -0
- data/lib/runtex_splitindex.rb +78 -0
- data/lib/runtex_tool.rb +128 -0
- data/lppl.txt +416 -0
- data/readme +73 -0
- data/unittest/expected/test_bibliography_babelbib.debug1.txt +31 -0
- data/unittest/expected/test_bibliography_babelbib.debug2.txt +16 -0
- data/unittest/expected/test_bibliography_babelbib.tex.runtex_summary.txt +19 -0
- data/unittest/expected/test_bibliography_babelbib_1.txt +15 -0
- data/unittest/expected/test_bibliography_babelbib_2.txt +11 -0
- data/unittest/expected/test_bibliography_plain.debug1.txt +45 -0
- data/unittest/expected/test_bibliography_plain.debug2.txt +16 -0
- data/unittest/expected/test_bibliography_plain.tex.runtex_summary.txt +18 -0
- data/unittest/expected/test_bibliography_plain_1.txt +19 -0
- data/unittest/expected/test_bibliography_plain_2.txt +11 -0
- data/unittest/expected/test_error.debug1.txt +22 -0
- data/unittest/expected/test_error.debug2.txt +12 -0
- data/unittest/expected/test_error.tex.runtex_summary.txt +15 -0
- data/unittest/expected/test_error_1.txt +15 -0
- data/unittest/expected/test_error_2.txt +12 -0
- data/unittest/expected/test_gloss.debug1.txt +45 -0
- data/unittest/expected/test_gloss.debug2.txt +16 -0
- data/unittest/expected/test_gloss.tex.runtex_summary.txt +18 -0
- data/unittest/expected/test_gloss_1.txt +19 -0
- data/unittest/expected/test_gloss_2.txt +11 -0
- data/unittest/expected/test_gloss_newgloss.debug1.txt +58 -0
- data/unittest/expected/test_gloss_newgloss.debug2.txt +20 -0
- data/unittest/expected/test_gloss_newgloss.tex.runtex_summary.txt +24 -0
- data/unittest/expected/test_gloss_newgloss_1.txt +23 -0
- data/unittest/expected/test_gloss_newgloss_2.txt +13 -0
- data/unittest/expected/test_glossaries.debug1.txt +56 -0
- data/unittest/expected/test_glossaries.debug2.txt +28 -0
- data/unittest/expected/test_glossaries.tex.runtex_summary.txt +30 -0
- data/unittest/expected/test_glossaries_1.txt +24 -0
- data/unittest/expected/test_glossaries_2.txt +19 -0
- data/unittest/expected/test_index.debug1.txt +35 -0
- data/unittest/expected/test_index.debug2.txt +18 -0
- data/unittest/expected/test_index.tex.runtex_summary.txt +24 -0
- data/unittest/expected/test_index2.debug1.txt +58 -0
- data/unittest/expected/test_index2.debug2.txt +29 -0
- data/unittest/expected/test_index2.tex.runtex_summary.txt +27 -0
- data/unittest/expected/test_index2_1.txt +23 -0
- data/unittest/expected/test_index2_2.txt +17 -0
- data/unittest/expected/test_index_1.txt +21 -0
- data/unittest/expected/test_index_2.txt +17 -0
- data/unittest/expected/test_makeindex.debug1.txt +35 -0
- data/unittest/expected/test_makeindex.debug2.txt +18 -0
- data/unittest/expected/test_makeindex.tex.runtex_summary.txt +18 -0
- data/unittest/expected/test_makeindex_1.txt +15 -0
- data/unittest/expected/test_makeindex_2.txt +11 -0
- data/unittest/expected/test_packagedoc_dtx.debug1.txt +54 -0
- data/unittest/expected/test_packagedoc_dtx.debug2.txt +27 -0
- data/unittest/expected/test_packagedoc_dtx.dtx.runtex_summary.txt +31 -0
- data/unittest/expected/test_packagedoc_dtx_1.txt +18 -0
- data/unittest/expected/test_packagedoc_dtx_2.txt +13 -0
- data/unittest/expected/test_rail.debug1.txt +35 -0
- data/unittest/expected/test_rail.debug2.txt +12 -0
- data/unittest/expected/test_rail.tex.runtex_summary.txt +12 -0
- data/unittest/expected/test_rail_1.txt +13 -0
- data/unittest/expected/test_rail_2.txt +9 -0
- data/unittest/expected/test_rail_error.debug1.txt +37 -0
- data/unittest/expected/test_rail_error.debug2.txt +35 -0
- data/unittest/expected/test_rail_error.tex.runtex_summary.txt +18 -0
- data/unittest/expected/test_rail_error_1.txt +18 -0
- data/unittest/expected/test_rail_error_2.txt +18 -0
- data/unittest/expected/test_splitindex.debug1.txt +64 -0
- data/unittest/expected/test_splitindex.debug2.txt +32 -0
- data/unittest/expected/test_splitindex.tex.runtex_summary.txt +31 -0
- data/unittest/expected/test_splitindex_1.txt +21 -0
- data/unittest/expected/test_splitindex_2.txt +15 -0
- data/unittest/expected/test_test.debug1.txt +32 -0
- data/unittest/expected/test_test.debug2.txt +12 -0
- data/unittest/expected/test_test.tex.runtex_summary.txt +12 -0
- data/unittest/expected/test_test_1.txt +15 -0
- data/unittest/expected/test_test_2.txt +9 -0
- data/unittest/expected/test_test_bibliography.debug1.txt +31 -0
- data/unittest/expected/test_test_gloss.debug1.txt +45 -0
- data/unittest/expected/test_test_gloss_newgloss.debug1.txt +58 -0
- data/unittest/expected/test_test_glossaries.debug1.txt +48 -0
- data/unittest/expected/test_test_index.debug1.txt +35 -0
- data/unittest/expected/test_test_index2.debug1.txt +58 -0
- data/unittest/expected/test_test_makeindex.debug1.txt +35 -0
- data/unittest/expected/test_test_rail.debug1.txt +35 -0
- data/unittest/expected/test_test_splitindex.debug1.txt +64 -0
- data/unittest/expected/test_test_test.debug1.txt +32 -0
- data/unittest/testcases.yaml +427 -0
- data/unittest/unittest_catch_output.rb +66 -0
- data/unittest/unittest_runtex.rb +282 -0
- metadata +149 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
#~ require 'tempfile' #needed to get logger.data
|
3
|
+
|
4
|
+
require 'catch_output'
|
5
|
+
|
6
|
+
class Test_RedirectStdout < Test::Unit::TestCase
|
7
|
+
|
8
|
+
def test_block()
|
9
|
+
assert_raise( RuntimeError ){ Frame_catch_output.catch_stdout() }
|
10
|
+
assert_raise( RuntimeError ){ Frame_catch_output.catch_screen_output() }
|
11
|
+
end #test_block()
|
12
|
+
|
13
|
+
def test_stdout()
|
14
|
+
#test with puts
|
15
|
+
assert_equal( "", Frame_catch_output.catch_stdout{})
|
16
|
+
assert_equal( "11\n", Frame_catch_output.catch_stdout{ puts 11 })
|
17
|
+
assert_equal( "11\n12\n", Frame_catch_output.catch_stdout{ puts 11; puts 12 })
|
18
|
+
assert_equal( "\n", Frame_catch_output.catch_stdout{ puts })
|
19
|
+
|
20
|
+
#test with print
|
21
|
+
assert_equal( "11", Frame_catch_output.catch_stdout{ print 11 })
|
22
|
+
assert_equal( "1112", Frame_catch_output.catch_stdout{ print 11; print 12 })
|
23
|
+
|
24
|
+
#Test with STDOUT
|
25
|
+
assert_equal( "11", Frame_catch_output.catch_stdout{ STDOUT << 11 })
|
26
|
+
end #test_stdout()
|
27
|
+
|
28
|
+
def test_stderr()
|
29
|
+
assert_equal( "", Frame_catch_output.catch_stderr{ })
|
30
|
+
assert_equal( "11", Frame_catch_output.catch_stderr{ STDERR << 11 })
|
31
|
+
end #test_stdout()
|
32
|
+
|
33
|
+
def test_catch_screen_output()
|
34
|
+
|
35
|
+
assert_equal( ["11\n",''], Frame_catch_output.catch_screen_output{ puts 11 })
|
36
|
+
assert_equal( ['', "11"], Frame_catch_output.catch_screen_output{ STDERR << 11 })
|
37
|
+
assert_equal( ["hello world\n", "earthquake"], Frame_catch_output.catch_screen_output{
|
38
|
+
puts 'hello world'
|
39
|
+
STDERR << 'earthquake'
|
40
|
+
})
|
41
|
+
|
42
|
+
assert_equal( ["hello world\n", nil],
|
43
|
+
Frame_catch_output.catch_screen_output( true, false) {
|
44
|
+
puts 'hello world'
|
45
|
+
})
|
46
|
+
assert_equal( [nil, "earthquake"],
|
47
|
+
Frame_catch_output.catch_screen_output( false, true) {
|
48
|
+
STDERR << 'earthquake'
|
49
|
+
})
|
50
|
+
|
51
|
+
end #test_catch_screen_output()
|
52
|
+
|
53
|
+
def test_nested_call()
|
54
|
+
out_o, err_o, out_i, err_i = nil
|
55
|
+
out_o, err_o = Frame_catch_output.catch_screen_output{
|
56
|
+
out_i, err_i = Frame_catch_output.catch_screen_output{
|
57
|
+
puts 'inner call'
|
58
|
+
}
|
59
|
+
puts 'outer call'
|
60
|
+
}
|
61
|
+
assert_equal( "outer call\n", out_o )
|
62
|
+
assert_equal( "inner call\n", out_i )
|
63
|
+
assert_equal( "", err_o )
|
64
|
+
assert_equal( "", err_i )
|
65
|
+
end #test_nested_call()
|
66
|
+
end #Test_RedirectStdout
|
@@ -0,0 +1,282 @@
|
|
1
|
+
#
|
2
|
+
#If this unit test reports errors:
|
3
|
+
#
|
4
|
+
# No Panic
|
5
|
+
#
|
6
|
+
#I found no easy way to create unit tests.
|
7
|
+
#
|
8
|
+
#What I do:
|
9
|
+
#-Creates test files (Based on testcases.yaml)
|
10
|
+
#-Call rtex
|
11
|
+
#-Compare the log.
|
12
|
+
#
|
13
|
+
#The test results depend on your local TeX-installation!
|
14
|
+
#
|
15
|
+
#The test works on _my_ installation.
|
16
|
+
#
|
17
|
+
#What you can do with this test:
|
18
|
+
#-Use the testfiles to make your own tests.
|
19
|
+
#
|
20
|
+
#If there are differences, it can be another TeX-installation.
|
21
|
+
#-Versions of tools (bibtex, makeindex, rail...)
|
22
|
+
#-Missing tool in your system (Rail.exe?)
|
23
|
+
#
|
24
|
+
#
|
25
|
+
|
26
|
+
Dir.chdir('../lib'){ require 'runtex' }
|
27
|
+
#~ Dir.chdir('../lib'){ require 'runtex_old' }
|
28
|
+
|
29
|
+
include RunTeX
|
30
|
+
|
31
|
+
#~ bibliography_plain
|
32
|
+
#~ bibliography_babelbib
|
33
|
+
#~ bibliography.bib
|
34
|
+
#~ packagedoc_dtx
|
35
|
+
#~ $testonly = %w{
|
36
|
+
#~ rail_error
|
37
|
+
#~ }
|
38
|
+
|
39
|
+
puts <<xx
|
40
|
+
Missing tests:
|
41
|
+
- Test Documente with errors (see testcases_log.yaml, -> more)
|
42
|
+
- Test overfull/underfull
|
43
|
+
Missing Code:
|
44
|
+
- Gui (runtex_gui.rb)
|
45
|
+
xx
|
46
|
+
|
47
|
+
|
48
|
+
require 'yaml'
|
49
|
+
require 'assert_equal_filecontent'
|
50
|
+
require 'test/unit'
|
51
|
+
|
52
|
+
#
|
53
|
+
#Mocking-Element for time (summary writes a time stamp)
|
54
|
+
#Side-effect: assert_equal_filecontent uses the same date.
|
55
|
+
class Time
|
56
|
+
def self.now()
|
57
|
+
return Time.local( 2000, 1, 1, 12, 0 )
|
58
|
+
#~ return Time.local( 2000, 1, 1, 12, 0 ) if caller().last =~ /#{__FILE__}/
|
59
|
+
#~ return Time.new
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
class Test_Configuration < Test::Unit::TestCase
|
65
|
+
include Catch_output
|
66
|
+
def test_yaml_data()
|
67
|
+
assert_instance_of( Hash, Job_chain::Configuration )
|
68
|
+
Job_chain::Configuration.each{|key, configuration|
|
69
|
+
assert_instance_of( Hash, configuration )
|
70
|
+
configuration.each{|key2, val2|
|
71
|
+
case key2
|
72
|
+
when 'call'
|
73
|
+
assert_instance_of( String, val2 )
|
74
|
+
when 'post'
|
75
|
+
assert_instance_of( Array, val2 )
|
76
|
+
when 'parameters'
|
77
|
+
assert_instance_of( Array, val2 )
|
78
|
+
val2.each{|val3|
|
79
|
+
assert_instance_of( Array, val3 )
|
80
|
+
}
|
81
|
+
else
|
82
|
+
puts "Undefined key #{key2}"
|
83
|
+
assert_equal( 1,2) #Just any error
|
84
|
+
assert_instance_of( Job_chain, key2 => val2 ) #Just any error
|
85
|
+
end
|
86
|
+
}
|
87
|
+
}
|
88
|
+
end
|
89
|
+
#All TeX-formats have the same start parameters
|
90
|
+
def test_latex_variants()
|
91
|
+
template = Job_chain::Configuration['latex']['parameters']
|
92
|
+
assert_equal( template, Job_chain::Configuration['pdflatex']['parameters'] )
|
93
|
+
assert_equal( template, Job_chain::Configuration['pdflualatex']['parameters'] )
|
94
|
+
assert_equal( template, Job_chain::Configuration['xelatex']['parameters'] )
|
95
|
+
end
|
96
|
+
def test_latex()
|
97
|
+
job = Job_chain.new('test')
|
98
|
+
assert_equal( 'latex -interaction=batchmode texfile',
|
99
|
+
LaTeX.new(job).build_cmd('latex', :filename => 'texfile') )
|
100
|
+
|
101
|
+
stdout, stderr = catch_screen_output{ LaTeX.new(job).build_cmd('latex') }
|
102
|
+
assert_equal( "ERROR test: Parameter :filename (nil) missing to execute latex\n", stdout )
|
103
|
+
end
|
104
|
+
def test_bibtex()
|
105
|
+
job = Job_chain.new('test')
|
106
|
+
assert_equal( 'bibtex filename', BibTeX.new(job).build_cmd('bibtex', :source => 'filename') )
|
107
|
+
|
108
|
+
#~ stdout, stderr = catch_screen_output{
|
109
|
+
#~ BibTeX.new(job).build_cmd('bibtex')
|
110
|
+
#~ }
|
111
|
+
#~ assert_equal( "ERROR test: Parameter :file_in (nil) missing to execute makeindex\n", stdout )
|
112
|
+
end
|
113
|
+
def test_makeindex()
|
114
|
+
job = Job_chain.new('test')
|
115
|
+
#makeindex take the default settings from the job
|
116
|
+
assert_equal( 'makeindex -o test.ind -t test.ilg test.idx',
|
117
|
+
Makeindex.new(job).build_cmd('makeindex') )
|
118
|
+
#Taking his own parameters
|
119
|
+
assert_equal( 'makeindex -s format -o file.ind -t file.ilg file.idx',
|
120
|
+
Makeindex.new(job).build_cmd('makeindex',
|
121
|
+
:file_in => 'file.idx',
|
122
|
+
:file_out => 'file.ind',
|
123
|
+
:file_log => 'file.ilg',
|
124
|
+
:format => 'format'
|
125
|
+
) )
|
126
|
+
assert_equal( 'makeindex -o file.ind -t file.ilg file.idx',
|
127
|
+
Makeindex.new(job).build_cmd('makeindex',
|
128
|
+
:file_in => 'file.idx',
|
129
|
+
:file_out => 'file.ind',
|
130
|
+
:file_log => 'file.ilg'
|
131
|
+
) )
|
132
|
+
stdout, stderr = catch_screen_output{
|
133
|
+
Makeindex.new(job).build_cmd('makeindex',
|
134
|
+
:file_out => 'file.ind',
|
135
|
+
:file_log => 'file.ilg'
|
136
|
+
)
|
137
|
+
}
|
138
|
+
assert_equal( "ERROR test: Parameter :file_in (nil) missing to execute makeindex\n", stdout )
|
139
|
+
|
140
|
+
stdout, stderr = catch_screen_output{
|
141
|
+
Makeindex.new(job).build_cmd('makeindex',
|
142
|
+
:file_in => 'file.idx',
|
143
|
+
:file_log => 'file.ilg'
|
144
|
+
)
|
145
|
+
}
|
146
|
+
assert_equal( "ERROR test: Parameter :file_out (-o) missing to execute makeindex\n", stdout )
|
147
|
+
end
|
148
|
+
def test_rail()
|
149
|
+
job = Job_chain.new('test')
|
150
|
+
assert_equal( 'C:/usr/texmf/tex/Latex/rail/rail.exe -t filename',
|
151
|
+
Rail.new(job).build_cmd('rail', :railfile => 'filename') )
|
152
|
+
|
153
|
+
#~ stdout, stderr = catch_screen_output{
|
154
|
+
#~ rail.new(job).build_cmd('rail')
|
155
|
+
#~ }
|
156
|
+
#~ assert_equal( "ERROR test: Parameter :file_in (nil) missing to execute makeindex\n", stdout )
|
157
|
+
end
|
158
|
+
end #Test_Configuration
|
159
|
+
|
160
|
+
#
|
161
|
+
# Test analyses of auxfile
|
162
|
+
#
|
163
|
+
class Test_log < Test::Unit::TestCase
|
164
|
+
#Dummy-job/File
|
165
|
+
job = Job_chain.new(__FILE__)
|
166
|
+
@@tex = LaTeX.new( job )
|
167
|
+
|
168
|
+
File.open('Testcases_log.yaml'){|yamlfile|
|
169
|
+
YAML.load(yamlfile).each_with_index{|testcase, num|
|
170
|
+
keys = %w{description source log_source result}
|
171
|
+
next if testcase['ignore']
|
172
|
+
(keys - testcase.keys).each{|key| puts "missing key #{key} for #{testcase.inspect}" }
|
173
|
+
(testcase.keys - keys).each{|key| puts "new key #{key} for #{testcase.inspect}"}
|
174
|
+
|
175
|
+
testcode = <<code
|
176
|
+
#{testcase['description'].gsub(/^/,'#') if testcase['description']}
|
177
|
+
def test_#{num}()
|
178
|
+
expected_result = #{testcase['result'].inspect}
|
179
|
+
assert_equal(expected_result,
|
180
|
+
@@tex.analyse_logfile("#{testcase['log_source']}"),
|
181
|
+
"#{testcase['description']}"
|
182
|
+
)
|
183
|
+
end #test_#{num}()
|
184
|
+
|
185
|
+
code
|
186
|
+
#Add testcode for this test case to the test class
|
187
|
+
self.module_eval( testcode ) #<===Here's the test
|
188
|
+
}
|
189
|
+
} #File
|
190
|
+
end #Test_aux < Test::Unit::TestCase
|
191
|
+
|
192
|
+
#
|
193
|
+
#Fo each test docuemnt in
|
194
|
+
#
|
195
|
+
class Test_Document < Test::Unit::TestCase
|
196
|
+
|
197
|
+
include Catch_output
|
198
|
+
|
199
|
+
#
|
200
|
+
#First create test examples in Testcases.yaml and create the test.
|
201
|
+
#
|
202
|
+
#1st job: Virgin data, everything must be done
|
203
|
+
#2nd job: Normally only 1 run necessary
|
204
|
+
#
|
205
|
+
#Each job is compared with the expected result for:
|
206
|
+
#-Compare log on screen (stdout, contains log start with INFO)
|
207
|
+
#-Compare debug log test_#{testcase}.debug[12].txt
|
208
|
+
#The debug log contains ionformation from Hash#inspect
|
209
|
+
#There may be (harmless) differences in the order of the values.
|
210
|
+
#
|
211
|
+
#This must be re-created for each test run.
|
212
|
+
#If there are already intermediate files,
|
213
|
+
['test'].each{|dir|
|
214
|
+
Dir.mkdir(dir) unless File.exist?(dir)
|
215
|
+
Dir["#{dir}/*"].each{|file| File.delete(file)}
|
216
|
+
}
|
217
|
+
#File the directories.
|
218
|
+
File.open('Testcases.yaml'){|yamlfile|
|
219
|
+
if defined?($testonly)
|
220
|
+
puts "! >> Restricted document test: #{$testonly.inspect}"
|
221
|
+
end
|
222
|
+
|
223
|
+
YAML.load(yamlfile).each{|testcase, testcode|
|
224
|
+
next if defined?($testonly) and ! $testonly.include?(testcase)
|
225
|
+
case testcase #Check for non-tex files
|
226
|
+
when /\.(bib)$/
|
227
|
+
File.open( "test/test_#{testcase}", 'w'){|texfile|
|
228
|
+
texfile << testcode
|
229
|
+
}
|
230
|
+
else
|
231
|
+
filename = "test/test_#{testcase}.tex"
|
232
|
+
filename = "test/test_#{testcase}.dtx" if testcase =~ /_dtx/
|
233
|
+
File.open( filename, 'w'){|texfile|
|
234
|
+
texfile << testcode
|
235
|
+
}
|
236
|
+
#Name for logs.
|
237
|
+
debuglog1 = "test_#{testcase}.debug1.txt"
|
238
|
+
debuglog2 = "test_#{testcase}.debug2.txt"
|
239
|
+
summary = File.basename("#{filename}.runtex_summary.txt")
|
240
|
+
testcode = <<code
|
241
|
+
def test_#{testcase}()
|
242
|
+
job = Job_chain.new('#{filename}')
|
243
|
+
|
244
|
+
#1st run - a lot of work
|
245
|
+
job.log.add(Log4r::FileOutputter.new('log_file_debug', :filename => 'test/#{debuglog1}', :level => Log4r::DEBUG ) )
|
246
|
+
stdout, stderr = catch_screen_output{ job.start(:pdflatex) }
|
247
|
+
job.log.outputters.last.close
|
248
|
+
|
249
|
+
assert_equal_filecontent( 'expected/test_#{testcase}_1.txt', stdout )
|
250
|
+
assert_equal_filecontent( 'expected/#{debuglog1}', File.readlines('test/#{debuglog1}').to_s )
|
251
|
+
|
252
|
+
puts stderr if stderr != '' #only for test reasons, stderr should be empty, but can be used for test output
|
253
|
+
|
254
|
+
#2nd run -should be shorter
|
255
|
+
job.log.add(Log4r::FileOutputter.new('log_file_debug2', :filename => 'test/#{debuglog2}', :level => Log4r::DEBUG ) )
|
256
|
+
stdout, stderr = catch_screen_output{ job.start(:pdflatex) }
|
257
|
+
job.log.outputters.last.close
|
258
|
+
assert_equal_filecontent( 'expected/test_#{testcase}_2.txt', stdout )
|
259
|
+
assert_equal_filecontent( 'expected/#{debuglog2}', File.readlines('test/#{debuglog2}').to_s )
|
260
|
+
|
261
|
+
#Check summary
|
262
|
+
assert_equal_filecontent( 'expected/#{summary}', File.readlines('test/#{summary}').to_s )
|
263
|
+
|
264
|
+
File.delete('test/#{debuglog1}')
|
265
|
+
File.delete('test/#{debuglog2}')
|
266
|
+
end
|
267
|
+
code
|
268
|
+
#Add testcode for this test case to the test class
|
269
|
+
self.module_eval( testcode ) #<===Here's the test
|
270
|
+
end #case testcase
|
271
|
+
#~ puts testcode
|
272
|
+
}
|
273
|
+
}
|
274
|
+
|
275
|
+
#~ def test_test()
|
276
|
+
#~ job = Job_chain.new('test/test_test.tex')
|
277
|
+
#~ job.log.level = Log4r::DEBUG
|
278
|
+
#~ stdout, stderr = catch_screen_output{ job.start(:pdflatex) }
|
279
|
+
#~ assert_equal_filecontent( 'expected/test_test.txt', stdout )
|
280
|
+
#~ end
|
281
|
+
|
282
|
+
end #Test_Configuration
|
metadata
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.9.4
|
3
|
+
specification_version: 1
|
4
|
+
name: runtex
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 0.2.1
|
7
|
+
date: 2009-05-20 00:00:00 +02:00
|
8
|
+
summary: runTeX - Translate (La)TeX-files as often as needed
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
email: knut@lickert.net
|
12
|
+
homepage: http://ruby.lickert.net/runtex
|
13
|
+
rubyforge_project: runtex
|
14
|
+
description: "runtex is a ruby script which allows you to translate a (La)TeX file. The program runs LaTeX as often as necessary, it checks for the need to start BibTeX, Makeindex, Rail... After finishing the script you get an overview on all errors (from each program the script used). It is possible to define by switches to define the way of processing: - LaTeX - pdfLaTeX - XeLaTeX - LuaLaTeX There are different reasons for additional tex runs. Beside the 'normal' LaTeX reasons for multiple TeX-calls, the following packages from CTAN are supported by runtex: - longtable: Allow tables to flow over page boundaries. http://www.ctan.org/tex-archive/help/Catalogue/entries/longtable.html http://www.ctan.org/cgi-bin/ctanPackageInformation.py?id=longtable - glossaries: Create glossaries and lists of acronyms. (uses makeindex) http://www.ctan.org/tex-archive/macros/latex/contrib/glossaries/ - gloss: Create glossaries using BibTeX. http://www.ctan.org/tex-archive/macros/latex/contrib/gloss/ - splitindex: Unlimited number of indexes http://www.ctan.org/tex-archive/macros/latex/contrib/splitindex/ (runtex replaces the other splitindex-programms like splitindex.pl, splitindex.jar, splitindex.exe, splitindex.tex). - index: Extended index for LaTeX including multiple indexes. http://www.ctan.org/tex-archive/macros/latex/contrib/index/ (works proper only in addition with index2.sty) - rail: Syntax specification in EBNF. http://www.ctan.org/tex-archive/support/rail/ Bugs, Wishes and new Features This program is tested on a WIN2K System with TeXLive 2008 and ruby 1.8.6. The results of the unit test depends on your TeX-installation. No panic if there are errors! If it does not work on your system: 1) Please check the configuration runtex_pathes.yaml. (where are the programs like makeindex, bibtex, rail...) Perhaps you must adapt it. There is no configuration for different systems. If you need another configuration, send me please your adaption, I will think about different configurations. 2) It does not work with Style X. Please inform me about it, send a minimal example, where the script does not enough runs. 3) The Error/Warning X is not reported/detected Please send a minimal example an the log-file The Files of this contribution: runtex-0.2.1.gem: Gem on Rubyforge runtex-0.2.1_CTAN.zip: - runtex.exe: The 'compiled' programm start runtex.exe -h for the switches - runtex-0.2.1.gem - Also available at Rubyforge - index2.sty: Minor modification of index.sty More details: http://ruby.lickert.net/runtex http://rubyforge.org/projects/runtex/ knut@lickert.net"
|
15
|
+
autorequire:
|
16
|
+
default_executable:
|
17
|
+
bindir: bin
|
18
|
+
has_rdoc: true
|
19
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
24
|
+
version:
|
25
|
+
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
post_install_message:
|
29
|
+
authors:
|
30
|
+
- Knut Lickert
|
31
|
+
files:
|
32
|
+
- lib/catch_output.rb
|
33
|
+
- lib/Code_zum_Pluendern_rtex4newrtex.rb
|
34
|
+
- lib/runtex.rb
|
35
|
+
- lib/runtex_bibtex.rb
|
36
|
+
- lib/runtex_job_chain.rb
|
37
|
+
- lib/runtex_latex.rb
|
38
|
+
- lib/runtex_makeindex.rb
|
39
|
+
- lib/runtex_rail.rb
|
40
|
+
- lib/runtex_splitindex.rb
|
41
|
+
- lib/runtex_tool.rb
|
42
|
+
- lib/runtex_pathes.yaml
|
43
|
+
- lppl.txt
|
44
|
+
- readme
|
45
|
+
test_files:
|
46
|
+
- unittest/unittest_catch_output.rb
|
47
|
+
- unittest/unittest_runtex.rb
|
48
|
+
- unittest/testcases.yaml
|
49
|
+
- unittest/expected/test_bibliography_babelbib.debug1.txt
|
50
|
+
- unittest/expected/test_bibliography_babelbib.debug2.txt
|
51
|
+
- unittest/expected/test_bibliography_babelbib.tex.runtex_summary.txt
|
52
|
+
- unittest/expected/test_bibliography_babelbib_1.txt
|
53
|
+
- unittest/expected/test_bibliography_babelbib_2.txt
|
54
|
+
- unittest/expected/test_bibliography_plain.debug1.txt
|
55
|
+
- unittest/expected/test_bibliography_plain.debug2.txt
|
56
|
+
- unittest/expected/test_bibliography_plain.tex.runtex_summary.txt
|
57
|
+
- unittest/expected/test_bibliography_plain_1.txt
|
58
|
+
- unittest/expected/test_bibliography_plain_2.txt
|
59
|
+
- unittest/expected/test_error.debug1.txt
|
60
|
+
- unittest/expected/test_error.debug2.txt
|
61
|
+
- unittest/expected/test_error.tex.runtex_summary.txt
|
62
|
+
- unittest/expected/test_error_1.txt
|
63
|
+
- unittest/expected/test_error_2.txt
|
64
|
+
- unittest/expected/test_gloss.debug1.txt
|
65
|
+
- unittest/expected/test_gloss.debug2.txt
|
66
|
+
- unittest/expected/test_gloss.tex.runtex_summary.txt
|
67
|
+
- unittest/expected/test_glossaries.debug1.txt
|
68
|
+
- unittest/expected/test_glossaries.debug2.txt
|
69
|
+
- unittest/expected/test_glossaries.tex.runtex_summary.txt
|
70
|
+
- unittest/expected/test_glossaries_1.txt
|
71
|
+
- unittest/expected/test_glossaries_2.txt
|
72
|
+
- unittest/expected/test_gloss_1.txt
|
73
|
+
- unittest/expected/test_gloss_2.txt
|
74
|
+
- unittest/expected/test_gloss_newgloss.debug1.txt
|
75
|
+
- unittest/expected/test_gloss_newgloss.debug2.txt
|
76
|
+
- unittest/expected/test_gloss_newgloss.tex.runtex_summary.txt
|
77
|
+
- unittest/expected/test_gloss_newgloss_1.txt
|
78
|
+
- unittest/expected/test_gloss_newgloss_2.txt
|
79
|
+
- unittest/expected/test_index.debug1.txt
|
80
|
+
- unittest/expected/test_index.debug2.txt
|
81
|
+
- unittest/expected/test_index.tex.runtex_summary.txt
|
82
|
+
- unittest/expected/test_index2.debug1.txt
|
83
|
+
- unittest/expected/test_index2.debug2.txt
|
84
|
+
- unittest/expected/test_index2.tex.runtex_summary.txt
|
85
|
+
- unittest/expected/test_index2_1.txt
|
86
|
+
- unittest/expected/test_index2_2.txt
|
87
|
+
- unittest/expected/test_index_1.txt
|
88
|
+
- unittest/expected/test_index_2.txt
|
89
|
+
- unittest/expected/test_makeindex.debug1.txt
|
90
|
+
- unittest/expected/test_makeindex.debug2.txt
|
91
|
+
- unittest/expected/test_makeindex.tex.runtex_summary.txt
|
92
|
+
- unittest/expected/test_makeindex_1.txt
|
93
|
+
- unittest/expected/test_makeindex_2.txt
|
94
|
+
- unittest/expected/test_packagedoc_dtx.debug1.txt
|
95
|
+
- unittest/expected/test_packagedoc_dtx.debug2.txt
|
96
|
+
- unittest/expected/test_packagedoc_dtx.dtx.runtex_summary.txt
|
97
|
+
- unittest/expected/test_packagedoc_dtx_1.txt
|
98
|
+
- unittest/expected/test_packagedoc_dtx_2.txt
|
99
|
+
- unittest/expected/test_rail.debug1.txt
|
100
|
+
- unittest/expected/test_rail.debug2.txt
|
101
|
+
- unittest/expected/test_rail.tex.runtex_summary.txt
|
102
|
+
- unittest/expected/test_rail_1.txt
|
103
|
+
- unittest/expected/test_rail_2.txt
|
104
|
+
- unittest/expected/test_rail_error.debug1.txt
|
105
|
+
- unittest/expected/test_rail_error.debug2.txt
|
106
|
+
- unittest/expected/test_rail_error.tex.runtex_summary.txt
|
107
|
+
- unittest/expected/test_rail_error_1.txt
|
108
|
+
- unittest/expected/test_rail_error_2.txt
|
109
|
+
- unittest/expected/test_splitindex.debug1.txt
|
110
|
+
- unittest/expected/test_splitindex.debug2.txt
|
111
|
+
- unittest/expected/test_splitindex.tex.runtex_summary.txt
|
112
|
+
- unittest/expected/test_splitindex_1.txt
|
113
|
+
- unittest/expected/test_splitindex_2.txt
|
114
|
+
- unittest/expected/test_test.debug1.txt
|
115
|
+
- unittest/expected/test_test.debug2.txt
|
116
|
+
- unittest/expected/test_test.tex.runtex_summary.txt
|
117
|
+
- unittest/expected/test_test_1.txt
|
118
|
+
- unittest/expected/test_test_2.txt
|
119
|
+
- unittest/expected/test_test_bibliography.debug1.txt
|
120
|
+
- unittest/expected/test_test_gloss.debug1.txt
|
121
|
+
- unittest/expected/test_test_glossaries.debug1.txt
|
122
|
+
- unittest/expected/test_test_gloss_newgloss.debug1.txt
|
123
|
+
- unittest/expected/test_test_index.debug1.txt
|
124
|
+
- unittest/expected/test_test_index2.debug1.txt
|
125
|
+
- unittest/expected/test_test_makeindex.debug1.txt
|
126
|
+
- unittest/expected/test_test_rail.debug1.txt
|
127
|
+
- unittest/expected/test_test_splitindex.debug1.txt
|
128
|
+
- unittest/expected/test_test_test.debug1.txt
|
129
|
+
rdoc_options: []
|
130
|
+
|
131
|
+
extra_rdoc_files:
|
132
|
+
- readme
|
133
|
+
executables: []
|
134
|
+
|
135
|
+
extensions: []
|
136
|
+
|
137
|
+
requirements:
|
138
|
+
- TeX, LaTeX, ...
|
139
|
+
- BibTeX, Makeindex, ...
|
140
|
+
dependencies:
|
141
|
+
- !ruby/object:Gem::Dependency
|
142
|
+
name: log4r
|
143
|
+
version_requirement:
|
144
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
145
|
+
requirements:
|
146
|
+
- - ">"
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: 0.0.0
|
149
|
+
version:
|