Skip to content

Fix case-sensitivity when comparing SPDX expressions #3289

Open
@sschuberth

Description

@sschuberth

Section 4 over here states that SPDX licenses should be matches case-insensitively. However, this test currently fails:

        val actualExpression = SpdxExpression.parse("CDDL-1.1 OR GPL-2.0-only WITH Classpath-Exception-2.0").normalize()
        val expectedExpression = SpdxExpression.parse("CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0").normalize()

        actualExpression shouldBe expectedExpression

Note the "E" vs "e" in "Exception".

When fixing this, we should discuss whether the test should also succeed without calling .normalize() on the expressions beforehand. I'd argue yes, the test should succeed also then, as the default behavior of comparing expressions should not consider the capitalization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hacktoberfestAn issue suitable for the Hacktoberfesthelp wantedAn issue where third-party help is wanted onspdx-utilsAbout the SPDX utility library

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions