Skip to content

Commit 2f7d6e8

Browse files
committed
chore: add nested list test
1 parent 520054a commit 2f7d6e8

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/N3Parser-test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,16 @@ describe('Parser', () => {
476476
['_:b1', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#first', '_:b0_y'],
477477
['_:b1', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#rest', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#nil']));
478478

479+
it('should parse a nested list',
480+
shouldParse('<a> <b> ( ( <c> ) ).',
481+
['a', 'b', '_:b0'],
482+
['_:b0', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#first', '_:b1'],
483+
['_:b0', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#rest', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#nil'],
484+
['_:b1', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#first', 'c'],
485+
['_:b1', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#rest', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#nil']
486+
));
487+
488+
479489
it('should parse statements with a nested empty list',
480490
shouldParse('<a> <b> (<x> ()).',
481491
['a', 'b', '_:b0'],

0 commit comments

Comments
 (0)