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

brackets in spdx license expression rejected by as_is_spdx_license_expression #469

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -264,6 +264,10 @@ as_is_spdx_license_expression (const gchar *license)
continue;
if (g_strcmp0 (tokens[i], "+") == 0)
continue;
if (g_strcmp0 (tokens[i], "(") == 0)
continue;
if (g_strcmp0 (tokens[i], ")") == 0)
continue;
if (g_strcmp0 (tokens[i], "^") == 0) {
expect_exception = TRUE;
continue;
@@ -471,6 +471,7 @@ test_spdx (void)
g_assert_true (as_license_is_free_license ("CC0"));
g_assert_true (as_license_is_free_license ("GPL-2.0 AND FSFAP"));
g_assert_true (as_license_is_free_license ("OFL-1.1 OR (GPL-3.0-or-later WITH Font-exception-2.0)"));
g_assert_true (as_is_spdx_license_expression("OFL-1.1 OR (GPL-3.0-or-later WITH Font-exception-2.0)"));
g_assert_true (!as_license_is_free_license ("NOASSERTION"));
g_assert_true (!as_license_is_free_license ("LicenseRef-proprietary=https://example.com/mylicense.txt"));
g_assert_true (!as_license_is_free_license ("MIT AND LicenseRef-proprietary=https://example.com/lic.txt"));