Reword the copyright notices to match what's suggested in GPLv3.
[automake/plouj.git] / lib / Automake / tests / Wrap.pl
blobd69af4e11dfe380792ce570f48199450ed45f2cf
1 # Copyright (C) 2003 Free Software Foundation, Inc.
3 # This file is part of GNU Automake.
5 # GNU Automake is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3, or (at your option)
8 # any later version.
10 # GNU Automake is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 use Automake::Wrap 'wrap';
20 my $failed = 0;
22 sub test_wrap
24 my ($in, $exp_out) = @_;
26 my $out = &wrap (@$in);
27 if ($out ne $exp_out)
29 print STDERR "For: @$in\nGot:\n$out\nInstead of:\n$exp_out\n---\n";
30 ++$failed;
34 my @tests = (
35 [["HEAD:", "NEXT:", "CONT", 13, "v" ,"a", "l", "ue", "s", "values"],
36 "HEAD:v aCONT
37 NEXT:l ueCONT
38 NEXT:sCONT
39 NEXT:values
40 "],
41 [["rule: ", "\t", " \\", 20, "dep1" ,"dep2", "dep3", "dep4", "dep5",
42 "dep06", "dep07", "dep08"],
43 "rule: dep1 dep2 \\
44 \tdep3 dep4 \\
45 \tdep5 dep06 \\
46 \tdep07 \\
47 \tdep08
48 "],
49 [["big header:", "big continuation:", " END", 5, "diag1", "diag2", "diag3"],
50 "big header:diag1 END
51 big continuation:diag2 END
52 big continuation:diag3
53 "],
54 [["big header:", "cont: ", " END", 16, "word1", "word2"],
55 "big header: END
56 cont: word1 END
57 cont: word2
58 "]);
61 test_wrap (@{$_}) foreach @tests;
63 exit $failed;
65 ### Setup "GNU" style for perl-mode and cperl-mode.
66 ## Local Variables:
67 ## perl-indent-level: 2
68 ## perl-continued-statement-offset: 2
69 ## perl-continued-brace-offset: 0
70 ## perl-brace-offset: 0
71 ## perl-brace-imaginary-offset: 0
72 ## perl-label-offset: -2
73 ## cperl-indent-level: 2
74 ## cperl-brace-offset: 0
75 ## cperl-continued-brace-offset: 0
76 ## cperl-label-offset: -2
77 ## cperl-extra-newline-before-brace: t
78 ## cperl-merge-trailing-else: nil
79 ## cperl-continued-statement-offset: 2
80 ## End: