Skip to content

Commit 6e044da

Browse files
committed
add --copyright option in test
Signed-off-by: Alok Kumar <alokkumarjipura9973@gmail.com>
1 parent 278b9ce commit 6e044da

3 files changed

Lines changed: 42 additions & 0 deletions

File tree

tests/licensedcode/data/plugin_license/extra-words/scan-extra-words-3-seq-license.expected.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,31 @@
6464
],
6565
"license_clues": [],
6666
"percentage_of_license_text": 87.24,
67+
"copyrights": [
68+
{
69+
"copyright": "Copyright (c) 2007, 2008, 2009 Mutsuo Saito, Makoto Matsumoto and Hiroshima University",
70+
"start_line": 1,
71+
"end_line": 2
72+
},
73+
{
74+
"copyright": "Copyright (c) 2011, 2002 Mutsuo Saito, Makoto Matsumoto, Hiroshima University and The University of Tokyo",
75+
"start_line": 3,
76+
"end_line": 4
77+
}
78+
],
79+
"holders": [
80+
{
81+
"holder": "Mutsuo Saito, Makoto Matsumoto and Hiroshima University",
82+
"start_line": 1,
83+
"end_line": 2
84+
},
85+
{
86+
"holder": "Mutsuo Saito, Makoto Matsumoto, Hiroshima University and The University of Tokyo",
87+
"start_line": 3,
88+
"end_line": 4
89+
}
90+
],
91+
"authors": [],
6792
"scan_errors": []
6893
}
6994
]

tests/licensedcode/data/plugin_license/extra-words/scan-extra-words-3-seq-with-copyrights-license.expected.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@
6464
],
6565
"license_clues": [],
6666
"percentage_of_license_text": 92.67,
67+
"copyrights": [
68+
{
69+
"copyright": "Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>",
70+
"start_line": 3,
71+
"end_line": 3
72+
}
73+
],
74+
"holders": [
75+
{
76+
"holder": "Kevin Decker",
77+
"start_line": 3,
78+
"end_line": 3
79+
}
80+
],
81+
"authors": [],
6782
"scan_errors": []
6883
}
6984
]

tests/licensedcode/test_plugin_license_detection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def test_license_match_extra_words_3_seq():
117117
result_file = test_env.get_temp_file('json')
118118
args = [
119119
'--license',
120+
'--copyright',
120121
'--license-text',
121122
'--license-text-diagnostics',
122123
'--license-diagnostics',
@@ -135,6 +136,7 @@ def test_license_match_extra_words_3_seq_with_copyrights():
135136
result_file = test_env.get_temp_file('json')
136137
args = [
137138
'--license',
139+
'--copyright',
138140
'--license-text',
139141
'--license-text-diagnostics',
140142
'--license-diagnostics',

0 commit comments

Comments
 (0)