Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tests/licensedcode/data/false_positive/false-positive-gpl3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.chip = {
.base = S5PC100_GPL1(0),
.ngpio = S5PC100_GPIO_L1_NR,
.label = "GPL1",
},
}, {
.chip = {
.base = S5PC100_GPL2(0),
.ngpio = S5PC100_GPIO_L2_NR,
.label = "GPL2",
},
}, {
.chip = {
.base = S5PC100_GPL3(0),
.ngpio = S5PC100_GPIO_L3_NR,
.label = "GPL3",
},
7 changes: 7 additions & 0 deletions tests/licensedcode/test_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,3 +1311,10 @@ def test_detection_return_correct_mit_not_apache_using_full_index(self):
matches = idx.match(location=query_location)
results = [m.rule.license_expression for m in matches]
assert results == expected

def test_detection_returns_correct_no_gpl3_false_positive(self):
idx = cache.get_index()
query_location = self.get_test_loc('false_positive/false-positive-gpl3.txt')
matches = idx.match(location=query_location)
assert not matches

Loading