Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new copyright test cases #2891

Merged
merged 3 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
21 changes: 21 additions & 0 deletions tests/cluecode/data/copyrights/AliasDotCom_Website.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<h1>Disclaimer for AliasDotCom Ltd.</h1>

<p>Copyright (C) AliasDotCom Ltd. All rights reserved.</p>

<p>If you require any more information or have any questions about our site's disclaimer, please feel free to contact us by email at noone@example.com.</p>

<h2>Disclaimers for aliasdotcom</h2>

<p>All the information on this website - https://www.aliasdotcom.com - is published in good faith and for general information purpose only. aliasdotcom does not make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this website (aliasdotcom), is strictly at your own risk. aliasdotcom will not be liable for any losses and/or damages in connection with the use of our website.</p>

<p>From our website, you can visit other websites by following hyperlinks to such external sites. While we strive to provide only quality links to useful and ethical websites, we have no control over the content and nature of these sites. These links to other websites do not imply a recommendation for all the content found on these sites. Site owners and content may change without notice and may occur before we have the opportunity to remove a link which may have gone 'bad'.</p>

<p>Please be also aware that when you leave our website, other sites may have different privacy policies and terms which are beyond our control. Please be sure to check the Privacy Policies of these sites as well as their "Terms of Service" before engaging in any business or uploading any information.</p>

<h2>Consent</h2>

<p>By using our website, you hereby consent to our disclaimer and agree to its terms.</p>

<h2>Update</h2>

<p>Should we update, amend or make any changes to this document, those changes will be prominently posted here.</p>
9 changes: 9 additions & 0 deletions tests/cluecode/data/copyrights/AliasDotCom_Website.html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
what:
- copyrights
- holders

copyrights:
- Copyright (c) AliasDotCom Ltd.

holders:
- AliasDotCom Ltd.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (c) corps69
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
what:
- copyrights
- holders
1 change: 1 addition & 0 deletions tests/cluecode/data/copyrights/copr.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
copr. (c) Foobar Pvt. Ltd.
19 changes: 19 additions & 0 deletions tests/cluecode/data/copyrights/copr.txt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
what:
- copyrights
- holders
- copyrights_summary
- holders_summary

copyrights:
- copr. (c) Foobar Pvt. Ltd.

holders:
- Foobar Pvt. Ltd.

copyrights_summary:
- value: copr. (c) Foobar Pvt. Ltd.
count: 1

holders_summary:
- value: Foobar Pvt. Ltd.
count: 1
3 changes: 3 additions & 0 deletions tests/cluecode/data/copyrights/copyright_in_docstring.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
Copr. (c) 1999 Random Corp. Ltd.
"""
9 changes: 9 additions & 0 deletions tests/cluecode/data/copyrights/copyright_in_docstring.py.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
what:
- copyrights
- holders

copyrights:
- Copr. (c) 1999 Random Corp. Ltd.

holders:
- Random Corp. Ltd.
1 change: 1 addition & 0 deletions tests/cluecode/data/copyrights/copyright_without_icon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright Foobar Pvt. Ltd.. All rights reserved.
19 changes: 19 additions & 0 deletions tests/cluecode/data/copyrights/copyright_without_icon.txt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
what:
- copyrights
- holders
- copyrights_summary
- holders_summary

copyrights:
- Copyright Foobar Pvt. Ltd

holders:
- Foobar Pvt. Ltd

copyrights_summary:
- value: Copyright Foobar Pvt. Ltd
count: 1

holders_summary:
- value: Foobar Pvt. Ltd
count: 1
3 changes: 3 additions & 0 deletions tests/cluecode/data/copyrights/gibberish_holder_name.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*
* Copyright (C) %34hkj12iaksd2@//0
*/
5 changes: 5 additions & 0 deletions tests/cluecode/data/copyrights/gibberish_holder_name.c.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
what:
- copyrights
- holders
- copyrights_summary
- holders_summary
3 changes: 3 additions & 0 deletions tests/cluecode/data/copyrights/gibberish_holdername.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*
* Copyright (c) Micr0s?3t4ii2\ew
*/
3 changes: 3 additions & 0 deletions tests/cluecode/data/copyrights/gibberish_holdername.c.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
what:
- copyrights
- holders
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(c) adfe??+_93\ee\adfds\/ad<ds>Copyright(c) Microsoft
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
what:
- copyrights
- holders

copyrights:
- Copyright (c) Microsoft

holders:
- Microsoft
3 changes: 3 additions & 0 deletions tests/cluecode/data/copyrights/in_docstring.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
© 1989-2000 Baz Corporation. All rights reserved.
"""
10 changes: 10 additions & 0 deletions tests/cluecode/data/copyrights/in_docstring.py.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
what:
- copyrights
- holders
- authors

copyrights:
- (c) 1989-2000 Baz Corporation

holders:
- Baz Corporation
4 changes: 4 additions & 0 deletions tests/cluecode/data/copyrights/invalid_copyright_year.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) RandomCompany 2990-2999

def fn():
pass
15 changes: 15 additions & 0 deletions tests/cluecode/data/copyrights/invalid_copyright_year.py.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
what:
- copyrights
- holders
- copyrights_summary

copyrights:
- Copyright (c) RandomCompany

holders:
- RandomCompany

copyrights_summary:
- value: Copyright (c) RandomCompany
count: 1

1 change: 1 addition & 0 deletions tests/cluecode/data/copyrights/long_holder_name.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (c) 2000-2021 Adolph Blaine Charles David Earl Frederick Gerald Hubert Irvin John Kenneth Lloyd Martin Nero Oliver Paul Quincy Randolph Sherman Thomas Uncas Victor William Xerxes Yancy Zeus Wolfeschlegelsteinhausenbergerdorffwelchevoralternwarengewissenhaftschaferswessenschafewarenwohlgepflegeundsorgfaltigkeitbeschutzenvonangreifendurchihrraubgierigfeindewelchevoralternzwolftausendjahresvorandieerscheinenvanderersteerdemenschderraumschiffgebrauchlichtalsseinursprungvonkraftgestartseinlangefahrthinzwischensternartigraumaufdersuchenachdiesternwelchegehabtbewohnbarplanetenkreisedrehensichundwohinderneurassevonverstandigmenschlichkeitkonntefortpflanzenundsicherfreuenanlebenslanglichfreudeundruhemitnichteinfurchtvorangreifenvonandererintelligentgeschopfsvonhinzwischensternartigraum
9 changes: 9 additions & 0 deletions tests/cluecode/data/copyrights/long_holder_name.txt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
what:
- copyrights
- holders

copyrights:
- Copyright (c) 2000-2021 Adolph Blaine Charles David Earl Frederick Gerald Hubert Irvin John Kenneth Lloyd Martin Nero Oliver Paul Quincy Randolph Sherman Thomas Uncas Victor William Xerxes Yancy Zeus Wolfeschlegelsteinhausenbergerdorffwelchevoralternwarengewissenhaftschaferswessenschafewarenwohlgepflegeundsorgfaltigkeitbeschutzenvonangreifendurchihrraubgierigfeindewelchevoralternzwolftausendjahresvorandieerscheinenvanderersteerdemenschderraumschiffgebrauchlichtalsseinursprungvonkraftgestartseinlangefahrthinzwischensternartigraumaufdersuchenachdiesternwelchegehabtbewohnbarplanetenkreisedrehensichundwohinderneurassevonverstandigmenschlichkeitkonntefortpflanzenundsicherfreuenanlebenslanglichfreudeundruhemitnichteinfurchtvorangreifenvonandererintelligentgeschopfsvonhinzwischensternartigraum

holders:
- Adolph Blaine Charles David Earl Frederick Gerald Hubert Irvin John Kenneth Lloyd Martin Nero Oliver Paul Quincy Randolph Sherman Thomas Uncas Victor William Xerxes Yancy Zeus Wolfeschlegelsteinhausenbergerdorffwelchevoralternwarengewissenhaftschaferswessenschafewarenwohlgepflegeundsorgfaltigkeitbeschutzenvonangreifendurchihrraubgierigfeindewelchevoralternzwolftausendjahresvorandieerscheinenvanderersteerdemenschderraumschiffgebrauchlichtalsseinursprungvonkraftgestartseinlangefahrthinzwischensternartigraumaufdersuchenachdiesternwelchegehabtbewohnbarplanetenkreisedrehensichundwohinderneurassevonverstandigmenschlichkeitkonntefortpflanzenundsicherfreuenanlebenslanglichfreudeundruhemitnichteinfurchtvorangreifenvonandererintelligentgeschopfsvonhinzwischensternartigraum
1 change: 1 addition & 0 deletions tests/cluecode/data/copyrights/long_name.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (c) 2021 Adolph Blaine Charles David Earl Frederick Gerald Hubert Irvin John Kenneth Lloyd Martin Nero Oliver Paul Quincy Randolph Sherman Thomas Uncas Victor William Xerxes Yancy Zeus Wolfeschlegelsteinhausenbergerdorffwelchevoralternwarengewissenhaftschaferswessenschafewarenwohlgepflegeundsorgfaltigkeitbeschutzenvonangreifendurchihrraubgierigfeindewelchevoralternzwolftausendjahresvorandieerscheinenvanderersteerdemenschderraumschiffgebrauchlichtalsseinursprungvonkraftgestartseinlangefahrthinzwischensternartigraumaufdersuchenachdiesternwelchegehabtbewohnbarplanetenkreisedrehensichundwohinderneurassevonverstandigmenschlichkeitkonntefortpflanzenundsicherfreuenanlebenslanglichfreudeundruhemitnichteinfurchtvorangreifenvonandererintelligentgeschopfsvonhinzwischensternartigraum
9 changes: 9 additions & 0 deletions tests/cluecode/data/copyrights/long_name.txt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
what:
- copyrights
- holders

copyrights:
- Copyright (c) 2021 Adolph Blaine Charles David Earl Frederick Gerald Hubert Irvin John Kenneth Lloyd Martin Nero Oliver Paul Quincy Randolph Sherman Thomas Uncas Victor William Xerxes Yancy Zeus Wolfeschlegelsteinhausenbergerdorffwelchevoralternwarengewissenhaftschaferswessenschafewarenwohlgepflegeundsorgfaltigkeitbeschutzenvonangreifendurchihrraubgierigfeindewelchevoralternzwolftausendjahresvorandieerscheinenvanderersteerdemenschderraumschiffgebrauchlichtalsseinursprungvonkraftgestartseinlangefahrthinzwischensternartigraumaufdersuchenachdiesternwelchegehabtbewohnbarplanetenkreisedrehensichundwohinderneurassevonverstandigmenschlichkeitkonntefortpflanzenundsicherfreuenanlebenslanglichfreudeundruhemitnichteinfurchtvorangreifenvonandererintelligentgeschopfsvonhinzwischensternartigraum

holders:
- Adolph Blaine Charles David Earl Frederick Gerald Hubert Irvin John Kenneth Lloyd Martin Nero Oliver Paul Quincy Randolph Sherman Thomas Uncas Victor William Xerxes Yancy Zeus Wolfeschlegelsteinhausenbergerdorffwelchevoralternwarengewissenhaftschaferswessenschafewarenwohlgepflegeundsorgfaltigkeitbeschutzenvonangreifendurchihrraubgierigfeindewelchevoralternzwolftausendjahresvorandieerscheinenvanderersteerdemenschderraumschiffgebrauchlichtalsseinursprungvonkraftgestartseinlangefahrthinzwischensternartigraumaufdersuchenachdiesternwelchegehabtbewohnbarplanetenkreisedrehensichundwohinderneurassevonverstandigmenschlichkeitkonntefortpflanzenundsicherfreuenanlebenslanglichfreudeundruhemitnichteinfurchtvorangreifenvonandererintelligentgeschopfsvonhinzwischensternartigraum
6 changes: 6 additions & 0 deletions tests/cluecode/data/copyrights/multiple_copyrights.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
* Copyright(C) Microsoft. All rights reserved.
* Copyright(c) 2000-2001 Alias Ltd. All rights reserved. This is just an example corporation
* named Alias
* Copyright (c) Microsoft.
*/
20 changes: 20 additions & 0 deletions tests/cluecode/data/copyrights/multiple_copyrights.cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
what:
- copyrights
- holders

copyrights:
- Copyright (c) Microsoft
- Copyright (c) 2000-2001 Alias Ltd.
- Copyright (c) Microsoft

holders:
- Microsoft
- Alias Ltd.
- Microsoft

copyrights_summary:
- value: Copyright (c) Microsoft
count: 2

- value: Copyright (c) 2000-2001 Alias Ltd.
count: 1
4 changes: 4 additions & 0 deletions tests/cluecode/data/copyrights/multiple_copyrights.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
\\ewasdfasd\Copyright(c) Microsoft
\\'''?0Copyright(c) Adobe 1999'''
Copyright(c)Microsoft
weasdfkjadfadflkjl
20 changes: 20 additions & 0 deletions tests/cluecode/data/copyrights/multiple_copyrights.txt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
what:
- copyrights
- holders
- copyrights_summary

copyrights:
- Copyright (c) Microsoft
- (c) Adobe 1999
- Copyright (c) Microsoft

holders:
- Microsoft
- Adobe
- Microsoft

copyrights_summary:
- value: Copyright (c) Microsoft
count: 2
- value: (c) Adobe
count: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(c) 1990-2005 Microsoft All rights reserved
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
what:
- copyrights
- holders

copyrights:
- (c) 1990-2005 Microsoft

holders:
- Microsoft
21 changes: 21 additions & 0 deletions tests/cluecode/data/copyrights/unlimited_copr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<h1>Disclaimer for Unlimited Ltd.</h1>

<p>Copyright (c) Unlimited Ltd.</p>

<p>If you require any more information or have any questions about our site's disclaimer, please feel free to contact us by email at unlimited.ceo@unlimited.com.</p>

<h2>Disclaimers for unlimited</h2>

<p>All the information on this website - https://www.unlimited.com - is published in good faith and for general information purpose only. unlimited does not make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this website (unlimited), is strictly at your own risk. unlimited will not be liable for any losses and/or damages in connection with the use of our website.</p>

<p>From our website, you can visit other websites by following hyperlinks to such external sites. While we strive to provide only quality links to useful and ethical websites, we have no control over the content and nature of these sites. These links to other websites do not imply a recommendation for all the content found on these sites. Site owners and content may change without notice and may occur before we have the opportunity to remove a link which may have gone 'bad'.</p>

<p>Please be also aware that when you leave our website, other sites may have different privacy policies and terms which are beyond our control. Please be sure to check the Privacy Policies of these sites as well as their "Terms of Service" before engaging in any business or uploading any information.</p>

<h2>Consent</h2>

<p>By using our website, you hereby consent to our disclaimer and agree to its terms.</p>

<h2>Update</h2>

<p>Should we update, amend or make any changes to this document, those changes will be prominently posted here.</p>
9 changes: 9 additions & 0 deletions tests/cluecode/data/copyrights/unlimited_copr.html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
what:
- copyrights
- holders

copyrights:
- Copyright (c) Unlimited Ltd.

holders:
- Unlimited Ltd.