File tree Expand file tree Collapse file tree 1 file changed +18
-22
lines changed Expand file tree Collapse file tree 1 file changed +18
-22
lines changed Original file line number Diff line number Diff line change 2
2
var parse = require (' spdx-expression-parse' )
3
3
var assert = require (' assert' )
4
4
5
- var firstAST = {
6
- left: {license: ' LGPL-2.1' },
7
- conjunction: ' or' ,
8
- right: {
9
- left: {license: ' BSD-3-Clause' },
10
- conjunction: ' and' ,
11
- right: {license: ' MIT' }
12
- }
13
- }
14
-
15
5
assert .deepEqual (
16
6
parse (' (LGPL-2.1 OR BSD-3-Clause AND MIT)' ),
17
- firstAST
18
- )
19
-
20
- var secondAST = {
21
- left: {license: ' MIT' },
22
- conjunction: ' and' ,
23
- right: {
24
- left: {license: ' LGPL-2.1' , plus: true },
25
- conjunction: ' and' ,
26
- right: {license: ' BSD-3-Clause' }
7
+ {
8
+ left: {license: ' LGPL-2.1' },
9
+ conjunction: ' or' ,
10
+ right: {
11
+ left: {license: ' BSD-3-Clause' },
12
+ conjunction: ' and' ,
13
+ right: {license: ' MIT' }
14
+ }
27
15
}
28
- }
16
+ )
29
17
30
18
assert .deepEqual (
31
19
parse (' (MIT AND (LGPL-2.1+ AND BSD-3-Clause))' ),
32
- secondAST
20
+ {
21
+ left: {license: ' MIT' },
22
+ conjunction: ' and' ,
23
+ right: {
24
+ left: {license: ' LGPL-2.1' , plus: true },
25
+ conjunction: ' and' ,
26
+ right: {license: ' BSD-3-Clause' }
27
+ }
28
+ }
33
29
)
34
30
35
31
// We handle all the bare SPDX license and exception ids as well.
You can’t perform that action at this time.
0 commit comments