mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
15 lines
664 B
JavaScript
15 lines
664 B
JavaScript
var test = require('tape');
|
|
var parse = require('../').parse;
|
|
|
|
test('comment', function (t) {
|
|
t.same(parse('beep#boop'), [ 'beep', { comment: 'boop' } ]);
|
|
t.same(parse('beep #boop'), [ 'beep', { comment: 'boop' } ]);
|
|
t.same(parse('beep # boop'), [ 'beep', { comment: 'boop' } ]);
|
|
t.same(parse('beep # > boop'), [ 'beep', { comment: '> boop' } ]);
|
|
t.same(parse('beep # "> boop"'), [ 'beep', { comment: '"> boop"' } ]);
|
|
t.same(parse('beep "#"'), [ 'beep', '#' ]);
|
|
t.same(parse('beep #"#"#'), [ 'beep', { comment: '"#"#' } ]);
|
|
t.same(parse('beep > boop # > foo'), [ 'beep', {op: '>'}, 'boop', { comment: '> foo' } ]);
|
|
t.end();
|
|
});
|