add mandatory test 6.1.54 - #700
Conversation
4c4fa6f to
e5c3a5c
Compare
e5c3a5c to
f37eacc
Compare
f37eacc to
6c152f1
Compare
|
Coverage after merging feat/csaf-2.1-mandatory-test-6.1.54 into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Parser does not enforce whitespace around WITH, AND, and OR
I think this part of the specification is not implemented correctly yet:
There MUST NOT be white space between a license-id and any following
+. This supports easy parsing and backwards compatibility. There MUST be white space on either side of the operatorWITH. There MUST be white space and/or parentheses on either side of the operatorsANDandOR.
To verify this, the following tests reproduce the issue:
it('requires white space on both sides of `WITH`', () => {
expect(() => parse('MIT WITHClasspath-exception-2.0')).to.throw(SyntaxError)
})
it('requires white space on both sides of `AND/OR`', () => {
expect(() => parse('MIT ANDClasspath-exception-2.0')).to.throw(SyntaxError)
expect(() => parse('MIT ORClasspath-exception-2.0')).to.throw(SyntaxError)
})
it('requires white space and/or parentheses on both sides of `AND`', () => {
// Missing separator on either side must be rejected
expect(() => parse('(MIT)ANDBSD-3-Clause')).to.throw(SyntaxError)
expect(() => parse('MITAND(BSD-3-Clause)')).to.throw(SyntaxError)
})Currently these expressions are parsed without throwing a SyntaxError, even though the spec requires whitespace (and/or parentheses) around WITH, AND, and OR. It looks like the parser/lexer doesn't enforce this separator rule strictly enough.
No description provided.