Test license matching against more than one instance
See original GitHub issueIn this comment, @goneall pointed at LicenseRDFAGenerator.java as a way to test our license-matching against known-sufficient instances of each license’s text (maybe here?  My Java is weak).  However, a single test case is insufficient to exercise conditional inclusions like the new XML <alt …> and <optional> sections.  I’d rather see a corpus of known license instances (e.g. BSD-2-Clause/good/basic.txt, BSD-2-Clause/good/altered-copyright-holder.txt, BSD-2-Clause/bad/additional-condition.txt, …) to ensure we successfully match license instances that those short identifiers are intended to correspond to.  That way we know that the <alt …>, <optional>, etc. markup and the spec’s matching guidelines are as broad (or narrow) as the legal team expects them to be.
Issue Analytics
- State:
 - Created 6 years ago
 - Comments:5 (5 by maintainers)
 

Top Related StackOverflow Question
@wking Excellent suggestions. Agree with all points. @jmanbeck has already created a repository with test files for testing license scanners: https://github.com/spdx/license-test-files
We can add a directory for the full license file text tests in your suggested formats and update the README to reflect the new test files.
It is a bit more work for the tools (I need to add the git checkout code), so it may take a little longer to implement - but I feel it is worth it to make life easier for the submitters of test files.
Added testing in commit 7e4de292700d84714d6d05a1a3310b9f26ccb1dc