File: tex.at

package info (click to toggle)
pspp 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 66,676 kB
  • sloc: ansic: 267,210; xml: 18,446; sh: 5,534; python: 2,881; makefile: 125; perl: 64
file content (335 lines) | stat: -rw-r--r-- 11,956 bytes parent folder | download
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
dnl PSPP - a program for statistical analysis.
dnl Copyright (C) 2020 Free Software Foundation, Inc.
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation, either version 3 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
dnl

AT_BANNER([tex driver])

dnl By passing --xdvi=xdvi to TESTSUITEFLAGS, one can view the rendered dvi from
dnl tests defined in this file.
AT_ARG_OPTION_ARG([xdvi],[AS_HELP_STRING([--xdvi],
  [the xdvi program to show show TeX output (default none)])])

AT_SETUP([tex glyphs])

AT_CHECK([tex-glyphs pspp.tex], [0], [ignore], [ignore])

AT_SKIP_IF([test "$TEX" = no])

dnl  The wasy10 font and its associated .tex file must be installed.
dnl  in order to run this test.  On Debian based systems this is found
dnl  in the texlive-fonts-recommended package.
AT_SKIP_IF([! kpsewhich wasyfont.tex])
AT_CHECK([$TEX --halt-on-error pspp.tex], [0], [ignore], [ignore])

dnl There should be no overfull boxes
AT_CHECK([grep '^Overfull ' pspp.log], [1])
dnl nor any underful ones
AT_CHECK([grep '^Underfull ' pspp.log], [1])

test -z "$at_arg_xdvi" || AT_CHECK([$at_arg_xdvi -s 3 pspp.dvi], [0], [ignore])

AT_CLEANUP



AT_SETUP([tex utf8-strings])

mkdir sample-texts

dnl The following UTF-8 texts are a collection of snippets harvested
dnl from various Wikipedia sites.  Wikipedia articles are
dnl copyright and licenced under the GFDL (unversioned)
AT_DATA([sample-texts/en.txt], [[The
Battle of Artaza (Acción de Artaza) was
a battle that occurred on April 20–22, 1835 during the First
Carlist War.

Jerónimo Valdés, at the time Minister of War, arrived at the area known as
Las Amescoas with 22,000 men with the intention of
definitively destroying the Carlist forces.[1] Zumalacárregui had 5,000 men,
but had the advantage of knowing the terrain and practicing guerrilla tactics.
]])

AT_DATA([sample-texts/pl.txt], [[The Giszowiec składa się z budynków
wielorodzinnych z wielkiej płyty oraz
zabytkowych domów, przeważnie jedno- i dwurodzinnych, stanowiących
niegdyś zwarte osiedle górnicze, które do dziś jest unikatowe w skali
europejskiej i znajduje się na Szlaku Zabytków Techniki Województwa
Śląskiego. Zostało ono wybudowane dla górników pracujących w kopalni
Giesche (późniejszej kopalni Wieczorek) przez koncern Georg von
Giesches Erben na zlecenie dyrektora spółki Antona Uthemanna w latach
1907–1910. Projektantami osiedla byli Zillmannowie: Georg i
go dwa szlaki komunikacyjne: droga krajowa nr 86 oraz autostrada A4, a
także rozpoczyna swój bieg droga krajowa nr 81. Dzielnica ma
powierzchnię 12,03 km² (7,30% powierzchni miasta) i liczyła w 2007
roku 18 475 mieszkańców (5,9% ludności Katowic).
]])

AT_DATA([sample-texts/el.txt], [[Η πόλη των Σερρών υπήρξε η πιο
οχυρωμένη πόλη της περιοχής λόγω της στρατηγικής γεωγραφικής της
θέσης. Στα βόρεια της πόλης των Σερρών, πάνω σε λόφο γνωστό με την
επωνυμία Κουλάς, βρίσκεται η αρχαία και βυζαντινή ακρόπολη. Η ακρόπολη
όπως σώζεται σήμερα αποτελεί έργο των βυζαντινών χρόνων, αλλά
θεμελιώθηκε πάνω σε αρχαίο φρούριο  του 7ου και  6ου π. Χ. αιώνα. Η
κατασκευή της ακρόπολης χρονολογείται στον 9ο μ. Χ. αιώνα, πιθανότατα,
επί Αυτοκράτορα Νικηφόρου Φωκά και αναφέρεται σε πολλά βυζαντινά
χρυσόβουλα ως «κάστρο» με γνωστότερο καστροφύλακα τον Λέοντα τον
Αζανίτη. [1] Με την πάροδο των χρόνων ολόκληρη η πόλη χαρακτηριζόταν
ως «κάστρο» και οι Σερραίοι, «καστρινοί».
]])

AT_DATA([sample-texts/is.txt], [[Saloth Sar, betur þekktur sem Pol Pot,
var fæddur 19. maí 1925 og dó
15. apríl 1998. Hann var leiðtogi Rauðu khmeranna í Kambódíu frá 1963
til 1979 og er þekktastur fyrir dauða óhemjumargs fólks í stjórnartíð
sinni, sem var frá 1975 til 1979. Rauðu khmerarnir reyndu að
framfylgja sýn sinni um eins konar samyrkjuvæðingu, en meðal þess sem
hún átti að fela í sér var að borgarbúar flyttu út í sveitir og ynnu
þar við landbúnað eða í betrunarvinnu. Þeir töldu sig geta byrjað
siðmenninguna upp á nýtt og tóku því upp tímatal sem átti að hefjast
með valdatíð þeirra. Sú valdatíð var ekki löng, en því
mannskæðari. Þrælkunarvinna, vannæring, hrun í heilbrigðiskerfinu og
beinar aftökur kostuðu á bilinu 750.000 - 1.700.000 manns lífið (sumir
segja á bilinu).
]])

AT_DATA([sample-texts/hr.txt], [[Nakon što je film završen početkom
1984., autori su krenuli tražiti distributera. Odnijeli su film u Los
Angeles i pokazali ga velikim studijima. Svi su odbili izuzev Oriona
koji je prihvatio distribuciju, ali uz uvjet da ne bi ništa platio
unaprijed, što je investitorima bilo neprihvatljivo. Joel Coen
napominje da se dogovorio sa agentom za prodaju prava u inozemstvu
kako bi se napokon film počeo prikazivati negdje, no to je bio
riskantan potez jer to ubija zanimanje domaćih distributera.
]])

AT_DATA([sample-texts/cz.txt], [[Volarský dům alpského typu (německy
Wallerer Haus) je na území České
republiky ojedinělý typ venkovského dřevěného domu, jenž se vyskytuje
v šumavském městě Volary, které proto někdy bylo nazýváno „alpským
městečkem na Šumavě“. Mimo Volary se vyskytuje ještě v sousední obci
Dobrá a další jeden dům se nachází v Železné Rudě.[1] Další, do
současnosti nedochované domy, se nacházely v Českých Žlebech, Lenoře,
Hůrce a Vimperku. V širším okolí Šumavy (Chodsko, Klatovsko, Plánicko)
se vyskytují domy volarským stylem více nebo méně ovlivněné.[2]
]])

AT_DATA([sample-texts/de.txt], [[Urkundlich wurde Rehme 753 erstmals
in den fränkischen Reichsannalen erwähnt, als sich die fränkischen
Könige Pippin der Jüngere und sein Nachfolger Karl der Große auf
Feldzügen dorthin begaben.[2] Seit ca. 800 ist Rehme Sitz einer
Kirchengemeinde. Die romanische Laurentiuskirche stammt aus dem
12. Jahrhundert und wurde 1890–1892 im neoromanischen Stil erweitert.
]])

AT_DATA([sample-texts/ang.txt], [[Regn is ƿǣt æðmhēap, nā heard cynn
æðmhēapes sƿilce snāƿ, hægel, and īsregn. Tō regnenne, hit is nȳdmicel
þæt þicce dǣl þæs lyfthelmes sīe ƿearmra þonne his hāt meltunge, nēah
þǣm andƿlitan þǣre eorðan and ēac ofer him. Hē is sēo gæderung þæs
lyfthelmes æðmes on lyfte oþþæt hē is sƿā hefig þæt hē fealle, oft
full tō þǣre eorðan þǣm andƿlitan. Tū ƿeorc cunnon fyllan þā lyfte
oþþæt hire ƿæter beflōƿe: sēo acēlung þǣre lyfte and sēo settung
ƿæteres æðmes on þā lyfte.
]])

AT_DATA([sample-texts/sv.txt], [[Årsmedeltemperaturen i trakten är 18
°C. Den varmaste månaden är januari, då medeltemperaturen är 20 °C,
och den kallaste är juni, med 16 °C.[5] Genomsnittlig årsnederbörd är
2 874 millimeter. Den regnigaste månaden är februari, med i genomsnitt
421 mm nederbörd, och den torraste är augusti, med 79 mm nederbörd.[6]
]])


AT_CHECK([tex-strings -o pspp.tex sample-texts/*], [0], [ignore], [ignore])

AT_SKIP_IF([test "$TEX" = no])
AT_SKIP_IF([! kpsewhich wasyfont.tex])
AT_CHECK([$TEX --halt-on-error pspp.tex], [0], [ignore], [ignore])

test -z "$at_arg_xdvi" || AT_CHECK([$at_arg_xdvi -s 3 pspp.dvi], [0], [ignore])

AT_CLEANUP

dnl Check that no line exceeds 79 characters
m4_define([CHECK_MAX_LINE_LENGTH],
[[(while IFS= read -r line; do max=$(( max > ${#line} ? max : ${#line} )); done; test $max -le 80)]][ < $1])

AT_SETUP([tex simple example])

AT_DATA([simple.sps], [dnl
data list list /name (a16) score *.
begin data
alfred   34.0
bertram  12.2
charlie  12.1
david    54.1
end data.

descriptives /score.
])


AT_CHECK([pspp -O format=tex simple.sps], [0], [])
AT_CHECK([CHECK_MAX_LINE_LENGTH([pspp.tex])],[0],[ignore])

AT_SKIP_IF([test "$TEX" = no])
AT_CHECK([$TEX --halt-on-error pspp.tex], [0], [ignore], [ignore])

dnl There should be no overfull boxes
AT_CHECK([grep '^Overfull ' pspp.log], [1])
dnl nor any underful ones
AT_CHECK([grep '^Underfull ' pspp.log], [1])

test -z "$at_arg_xdvi" || AT_CHECK([$at_arg_xdvi -s 3 pspp.dvi], [0], [ignore])

AT_CLEANUP



AT_SETUP([tex another example])

AT_CHECK([pspp -O format=tex "$abs_top_srcdir/examples/regress.sps"], [0], [])
AT_CHECK([CHECK_MAX_LINE_LENGTH([pspp.tex])],[0],[ignore])


AT_SKIP_IF([test "$TEX" = no])
AT_CHECK([$TEX --halt-on-error pspp.tex], [0], [ignore], [ignore])

test -z "$at_arg_xdvi" || AT_CHECK([$at_arg_xdvi -s 3 pspp.dvi], [0], [ignore])

AT_CLEANUP


dnl This example emits a table footnote
AT_SETUP([tex table footnotes])

AT_DATA([footnote.sps], [dnl
set format = F11.3.
data list notable list /foo * bar * wiz * bang *.
begin data.
1   0   3   1
3   9 -50   5
3   4   3 203
4  -9   0  -4
98 78 104   2
3  50 -49 200
.   4   4   4
5   3   0   .
end data.

correlations
	variables = foo bar wiz bang
	/print nosig
	.
])

AT_CHECK([pspp -O format=tex footnote.sps], [0], [])
AT_CHECK([CHECK_MAX_LINE_LENGTH([pspp.tex])],[0],[ignore])

AT_SKIP_IF([test "$TEX" = no])
AT_CHECK([$TEX --halt-on-error pspp.tex], [0], [ignore], [ignore])

dnl There should be no overfull boxes
AT_CHECK([grep '^Overfull ' pspp.log], [1])
dnl nor any underful ones
AT_CHECK([grep '^Underfull ' pspp.log], [1])

test -z "$at_arg_xdvi" || AT_CHECK([$at_arg_xdvi -s 3 pspp.dvi], [0], [ignore])


AT_CLEANUP


dnl An example with non-ascii characters
AT_SETUP([tex non-ascii])

AT_DATA([utf8.sps], [dnl
set format = F11.3.
data list notable list /items (a16).
begin data.
Äpfeln
Öl
Üter
Tschüß
école
côte
français
þekktastur
landbúnað
16°C
powierzchnię
12.03km²
end data.

frequencies items.
])

AT_CHECK([LC_ALL=C.UTF-8 pspp -O format=tex utf8.sps], [0], [])
AT_CHECK([CHECK_MAX_LINE_LENGTH([pspp.tex])],[0],[ignore])

dnl The string "??" should not be present in pspp.tex
AT_CHECK([grep -F '??' pspp.tex], [1])

AT_SKIP_IF([test "$TEX" = no])
AT_CHECK([$TEX --halt-on-error pspp.tex], [0], [ignore], [ignore])

dnl There should be no overfull boxes
AT_CHECK([grep '^Overfull ' pspp.log], [1])
dnl nor any underful ones
AT_CHECK([grep '^Underfull ' pspp.log], [1])

test -z "$at_arg_xdvi" || AT_CHECK([$at_arg_xdvi -s 3 pspp.dvi], [0], [ignore])

AT_CLEANUP


dnl This example emits a table which is rather more complicated
dnl It has cells which span multiple columns
AT_SETUP([tex multispan])

AT_DATA([t-test.sps], [dnl
set format = F11.3.
data list notable list /score * group (a20).
begin data.
1 this
2 this
3 this
4 this
5 that
6 that
7 that
8 that
end data.

t-test /variables=score /group=group("this", "that").
])

AT_CHECK([pspp -O format=tex t-test.sps], [0], [])
AT_CHECK([CHECK_MAX_LINE_LENGTH([pspp.tex])],[0],[ignore])

AT_SKIP_IF([test "$TEX" = no])
AT_CHECK([$TEX --halt-on-error pspp.tex], [0], [ignore], [ignore])

dnl There should be no overfull boxes
AT_CHECK([grep '^Overfull ' pspp.log], [1])
dnl nor any underful ones
AT_CHECK([grep '^Underfull ' pspp.log], [1])

test -z "$at_arg_xdvi" || AT_CHECK([$at_arg_xdvi -s 3 pspp.dvi], [0], [ignore])


AT_CLEANUP