1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.rat.analysis.license;
20
21 import java.util.stream.Stream;
22
23 import org.junit.jupiter.params.provider.Arguments;
24
25
26
27
28
29
30 public class GPLLicenseTest extends AbstractLicenseTest {
31
32 private static final Arguments GPL1 = Arguments.of("GPL1", "GPL", "GNU General Public License, version 1", null,
33 new String[][] {
34 { "fulltext",
35 "This program is free software; you can redistribute it and/or modify\n "
36 + "it under the terms of the GNU General Public License as published by\n "
37 + "the Free Software Foundation; either version 1, or (at your option)\n "
38 + "any later version." },
39 { "spdx-tab", "SPDX-License-Identifier:\tGPL-1.0-only" },
40 { "spdx-space", "SPDX-License-Identifier: GPL-1.0-only" }, });
41
42 private static final Arguments GPL2 = Arguments.of("GPL2", "GPL", "GNU General Public License, version 2", null,
43 new String[][] {
44 { "fulltext",
45 "This program is free software; you can redistribute it and/or\n"
46 + "modify it under the terms of the GNU General Public License\n"
47 + "as published by the Free Software Foundation; either version 2\n"
48 + "of the License, or (at your option) any later version." },
49 { "spdx-tab", "SPDX-License-Identifier:\tGPL-2.0-only" },
50 { "spdx-space", "SPDX-License-Identifier: GPL-2.0-only" }, });
51
52 private static final Arguments GPL3 = Arguments.of("GPL3", "GPL", "GNU General Public License, version 3", null,
53 new String[][] {
54 { "fulltext",
55 "This program is free software: you can redistribute it and/or modify\n"
56 + " it under the terms of the GNU General Public License as published by\n"
57 + " the Free Software Foundation, either version 3 of the License, or\n"
58 + " (at your option) any later version." },
59 { "spdx-tab", "SPDX-License-Identifier:\tGPL-3.0-only" },
60 { "spdx-space", "SPDX-License-Identifier: GPL-3.0-only" }, });
61
62 public static Stream<Arguments> parameterProvider() {
63 return Stream.of(GPL1, GPL2, GPL3);
64 }
65 }