This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/shell-quote/test/comment.js
2019-08-11 20:48:02 +02:00

14 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();
});