5 # Permission is hereby granted, free of charge, to any person obtaining
6 # a copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sublicense, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
28 Validate that both .tex and .ltx files can handle a LaTeX-style
29 bibliography (by calling $BIBTEX to generate a .bbl file) and
30 correctly re-run to resolve undefined references.
32 Also verifies that package warnings are caught and re-run as needed.
37 test = TestSCons.TestSCons()
39 tex = test.where_is('tex')
40 latex = test.where_is('latex')
42 if not tex and not latex:
43 test.skip_test("Could not find tex or latex; skipping test(s).\n")
45 test.subdir('work1', 'work2', 'work3', 'work4')
49 \documentclass{article}
52 As stated in \cite{X}, this is a bug-a-boo.
54 \bibliographystyle{plain}
59 \documentclass{article}
62 % \bibliography{fooref}
63 % \bibliographystyle{plain}
68 \documentclass{article}
69 \usepackage{longtable}
72 As stated in the last paper, this is a bug-a-boo.
73 here is some more junk and another table
74 here is some more junk and another table
76 \begin{longtable}[l]{rlll}
77 Isotope &\multicolumn{1}{c}{Abar} &Name\\
79 1001 &1.0078 &Proton &$p$\\
80 1002 &2.0141 &Deuterium &$d$\\
81 1003 &3.0170 &Tritium &$t$\\
82 2003 &3.0160 &Helium 3 &He$^3$\\
83 2004 &4.0026 &Helium 4 &He$^{4}$\\
88 These parameters and arrays are filled in when the parameter \textbf{iftnrates}
91 \begin{longtable}[l]{ll}
93 \textbf{nxxxx} &Total number of particles made by xxxx reaction\\
94 \textbf{pxxxx} &Total number of particles made by xxxx reaction\\
95 \textbf{nxxxxx} &Total number of particles made by xxxxx reaction\\
96 \textbf{nxxxx} &Total number of particles made by xxxx reaction\\
97 \textbf{pxxxx} &Total number of particles made by xxxx reaction\\
98 \textbf{nxxxx} &Total number of particles made by xxxx reaction\\
99 \textbf{pxxxx} &Total number of particles made by xxxx reaction\\
100 \textbf{nxxxxx} &Total number of particles made by xxxxx reaction\\
101 \textbf{nxxxx} &Total number of particles made by xxxx reaction\\
102 \textbf{pxxxx} &Total number of particles made by xxxx reaction\\
104 \textbf{rnxxxx} &Regional total of particles made by xxxx reaction\\
105 \textbf{rpxxxx} &Regional total of particles made by xxxx reaction\\
106 \textbf{rnxxxxx} &Regional total of particles made by xxxxx reaction\\
107 \textbf{rnxxxx} &Regional total of particles made by xxxx reaction\\
108 \textbf{rpxxxx} &Regional total of particles made by xxxx reaction\\
109 \textbf{rnxxxx} &Regional total of particles made by xxxx reaction\\
110 \textbf{rpxxxx} &Regional total of particles made by xxxx reaction\\
111 \textbf{rnxxxxx} &Regional total of particles made by xxxxx reaction\\
112 \textbf{rnxxxx} &Regional total of particles made by xxxx reaction\\
113 \textbf{rpxxxx} &Regional total of particles made by xxxx reaction\\
115 \textbf{reactot}(r) &Total number of reactions for reaction r\\
116 \textbf{reacreg}(r,ir) &Total number of reactions for reaction r in region ir\\
126 title = "A determination of bug-a-boo-ness",
127 journal = "Journal of B.a.B.",
136 test.write(['work1', 'SConstruct'], """\
138 env = Environment(tools = ['pdftex', 'dvipdf', 'tex', 'latex'],
139 ENV = {'PATH' : os.environ['PATH']})
144 test.write(['work1', 'foo.tex'], input_file)
145 test.write(['work1', 'fooref.bib'], bibfile)
147 test.run(chdir = 'work1', arguments = '.')
149 test.must_exist(['work1', 'foo.bbl'])
151 foo_log = test.read(['work1', 'foo.log'])
152 test.must_not_contain_any_line(foo_log, ['undefined references'], 'foo.log')
154 test.write(['work3', 'SConstruct'], """\
156 env = Environment(tools = ['tex', 'latex'],
157 ENV = {'PATH' : os.environ['PATH']})
158 env.DVI( "foo3.tex" )
161 test.write(['work3', 'foo3.tex'], input_file3)
163 test.run(chdir = 'work3', arguments = '.')
165 foo_log = test.read(['work3', 'foo3.log'])
166 test.must_not_contain_any_line(foo_log, ['Rerun LaTeX'], 'foo3.log')
172 test.write(['work2', 'SConstruct'], """\
174 env = Environment(tools = ['dvi', 'pdf', 'pdftex', 'dvipdf', 'pdflatex', 'tex', 'latex'],
175 ENV = {'PATH' : os.environ['PATH']})
180 test.write(['work2', 'foo.ltx'], input_file)
181 test.write(['work2', 'fooref.bib'], bibfile)
183 test.run(chdir = 'work2', arguments = '.')
185 test.must_exist(['work2', 'foo.bbl'])
187 foo_log = test.read(['work2', 'foo.log'])
188 test.must_not_contain_any_line(foo_log, ['undefined references'], 'foo.log')
190 test.write(['work3', 'SConstruct'], """\
192 env = Environment(tools = ['pdftex', 'dvipdf', 'tex', 'latex'],
193 ENV = {'PATH' : os.environ['PATH']})
194 env.DVI( "foo3.tex" )
195 env.PDF( "foo3.tex" )
198 test.write(['work3', 'foo3.tex'], input_file3)
200 test.run(chdir = 'work3', arguments = '.')
202 foo_log = test.read(['work3', 'foo3.log'])
203 test.must_not_contain_any_line(foo_log, ['Rerun LaTeX'], 'foo3.log')
206 test.write(['work4', 'SConstruct'], """\
208 env = Environment(tools = ['tex', 'latex'],
209 ENV = {'PATH' : os.environ['PATH']})
212 test.write(['work4', 'foo.ltx'], input_file2)
214 test.run(chdir = 'work4', arguments = '.')
216 test.up_to_date(chdir = 'work4', arguments = '.')
223 # indent-tabs-mode:nil
225 # vim: set expandtab tabstop=4 shiftwidth=4: