source: frontend/node_modules/shell-quote/test/comment.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 642 bytes
Line 
1'use strict';
2
3var test = require('tape');
4var parse = require('../').parse;
5
6test('comment', function (t) {
7 t.same(parse('beep#boop'), ['beep', { comment: 'boop' }]);
8 t.same(parse('beep #boop'), ['beep', { comment: 'boop' }]);
9 t.same(parse('beep # boop'), ['beep', { comment: ' boop' }]);
10 t.same(parse('beep # > boop'), ['beep', { comment: ' > boop' }]);
11 t.same(parse('beep # "> boop"'), ['beep', { comment: ' "> boop"' }]);
12 t.same(parse('beep "#"'), ['beep', '#']);
13 t.same(parse('beep #"#"#'), ['beep', { comment: '"#"#' }]);
14 t.same(parse('beep > boop # > foo'), ['beep', { op: '>' }, 'boop', { comment: ' > foo' }]);
15 t.end();
16});
Note: See TracBrowser for help on using the repository browser.