Debian Codegraph @

test/line_breaking.t

raw
1 #!/usr/bin/env perl
2 # =============================================================================
3 #
4 # This file is part of BibTool.
5 # It is distributed under the GNU General Public License.
6 # See the file COPYING for details.
7 #
8 # (c) 2015-2020 Gerd Neugebauer
9 #
10 # Net: [email protected]
11 #
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2, or (at your option)
15 # any later version.
16 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #
26 #*=============================================================================
27
28 =head1 NAME
29
30 line_breaking.t - Test suite for BibTool applying line breaking during printing.
31
32 =head1 SYNOPSIS
33
34 line_breaking.t
35
36 =head1 DESCRIPTION
37
38 This module contains some test cases. Running this module as program
39 will run all test cases and print a summary for each. Optionally files
40 *.out and *.err are left if the expected result does not match the
41 actual result.
42
43 =head1 OPTIONS
44
45 none
46
47 =head1 AUTHOR
48
49 Gerd Neugebauer
50
51 =cut
52
53 use strict;
54 use BUnit;use warnings;
55
56
57 #------------------------------------------------------------------------------
58 BUnit::run(name => 'line_breaking-1',
59 args => '',
60 expected_err => '',
61 bib => <<__EOF__,
62 \@Article{key,
63 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
64 }
65 __EOF__
66 expected_out => <<__EOF__);
67
68 \@Article{ key,
69 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
70 }
71 __EOF__
72
73 #------------------------------------------------------------------------------
74 BUnit::run(name => 'line_breaking-2',
75 args => '',
76 expected_err => '',
77 bib => <<__EOF__,
78 \@Article{key,
79 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
80 }
81 __EOF__
82 expected_out => <<__EOF__);
83
84 \@Article{ key,
85 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
86 }
87 __EOF__
88
89 #------------------------------------------------------------------------------
90 BUnit::run(name => 'line_breaking-3',
91 args => '',
92 expected_err => '',
93 bib => <<__EOF__,
94 \@Article{key,
95 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
96 }
97 __EOF__
98 expected_out => <<__EOF__);
99
100 \@Article{ key,
101 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
102 }
103 __EOF__
104
105 #------------------------------------------------------------------------------
106 BUnit::run(name => 'line_breaking-4',
107 args => '',
108 expected_err => '',
109 bib => <<__EOF__,
110 \@Article{key,
111 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
112 }
113 __EOF__
114 expected_out => <<__EOF__);
115
116 \@Article{ key,
117 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
118 }
119 __EOF__
120
121 #------------------------------------------------------------------------------
122 BUnit::run(name => 'line_breaking-5',
123 args => '',
124 expected_err => '',
125 bib => <<__EOF__,
126 \@Article{key,
127 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
128 }
129 __EOF__
130 expected_out => <<__EOF__);
131
132 \@Article{ key,
133 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
134 }
135 __EOF__
136
137 #------------------------------------------------------------------------------
138 BUnit::run(name => 'line_breaking-6',
139 args => '',
140 expected_err => '',
141 bib => <<__EOF__,
142 \@Article{key,
143 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
144 }
145 __EOF__
146 expected_out => <<__EOF__);
147
148 \@Article{ key,
149 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
150 x}
151 }
152 __EOF__
153
154 #------------------------------------------------------------------------------
155 BUnit::run(name => 'line_breaking-7',
156 args => '',
157 expected_err => '',
158 bib => <<__EOF__,
159 \@Article{key,
160 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa x}
161 }
162 __EOF__
163 expected_out => <<__EOF__);
164
165 \@Article{ key,
166 title = {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
167 x}
168 }
169 __EOF__
170
171
172
173 #------------------------------------------------------------------------------
174 BUnit::run(name => 'line_breaking-11',
175 args => '',
176 expected_err => '',
177 bib => <<__EOF__,
178 \@Article{key,
179 title = {x aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
180 }
181 __EOF__
182 expected_out => <<__EOF__);
183
184 \@Article{ key,
185 title = {x aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
186 }
187 __EOF__
188
189 #------------------------------------------------------------------------------
190 BUnit::run(name => 'line_breaking-12',
191 args => '',
192 expected_err => '',
193 bib => <<__EOF__,
194 \@Article{key,
195 title = {x aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
196 }
197 __EOF__
198 expected_out => <<__EOF__);
199
200 \@Article{ key,
201 title = {x
202 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
203 }
204 __EOF__
205
206
207 1;
208 #------------------------------------------------------------------------------
209 # Local Variables:
210 # mode: perl
211 # End: