Skip to content

Commit

Permalink
passing quote tests
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed May 18, 2012
1 parent 8b2224c commit e1d6695
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/quote.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var test = require('tap').test;
var quote = require('../').quote;

test('quote', function (t) {
t.equal(quote([ 'a', 'b', 'c d' ]), 'a b \'c d\'');
t.equal(
quote([ 'a', 'b', "it's a \"neat thing\"" ]),
'a b "it\'s a \\"neat thing\\""'
);
t.equal(
quote([ '$', '`', '\'' ]),
'\\$ \\` "\'"'
);
t.end();
});

0 comments on commit e1d6695

Please sign in to comment.