Debian Codegraph @

test/print_align_key.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) 2011-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 print_align_key.t - Test suite for BibTool print.align.key.
31
32 =head1 SYNOPSIS
33
34 print_align_key.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 =head1 BUGS
52
53 =over 4
54
55 =item *
56
57 ...
58
59 =back
60
61 =cut
62
63 use strict;
64 use BUnit;use warnings;
65
66
67
68 #------------------------------------------------------------------------------
69 BUnit::run(name => 'print_align_key_1',
70 resource => <<__EOF__ ,
71 print.align.key = 0
72 __EOF__
73 bib => <<__EOF__ ,
74 \@Misc{ xxx,
75 author = "A. U. Thor"
76 }
77 __EOF__
78 expected_err => '',
79 expected_out => <<__EOF__ );
80
81 \@Misc{xxx,
82 author = "A. U. Thor"
83 }
84 __EOF__
85
86
87 #------------------------------------------------------------------------------
88 BUnit::run(name => 'print_align_key_2',
89 resource => <<__EOF__ ,
90 print.align.key = 1
91 __EOF__
92 bib => <<__EOF__ ,
93 \@Misc{ xxx,
94 author = "A. U. Thor"
95 }
96 __EOF__
97 expected_err => '',
98 expected_out => <<__EOF__ );
99
100 \@Misc{xxx,
101 author = "A. U. Thor"
102 }
103 __EOF__
104
105
106 #------------------------------------------------------------------------------
107 BUnit::run(name => 'print_align_key_3',
108 resource => <<__EOF__ ,
109 print.align.key = 24
110 __EOF__
111 bib => <<__EOF__ ,
112 \@Misc{ xxx,
113 author = "A. U. Thor"
114 }
115 __EOF__
116 expected_err => '',
117 expected_out => <<__EOF__ );
118
119 \@Misc{ xxx,
120 author = "A. U. Thor"
121 }
122 __EOF__
123
124
125 1;
126 #------------------------------------------------------------------------------
127 # Local Variables:
128 # mode: perl
129 # End: