[Pkg-javascript-commits] [node-shell-quote] 05/137: passing quote tests

Bastien Roucariès rouca at moszumanska.debian.org
Fri Aug 25 19:19:34 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-shell-quote.

commit e1d669503f0f159068deb45f14ba3a4bf77e90f0
Author: James Halliday <mail at substack.net>
Date:   Fri May 18 03:28:37 2012 -0700

    passing quote tests
---
 test/quote.js | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/test/quote.js b/test/quote.js
new file mode 100644
index 0000000..0e61b88
--- /dev/null
+++ b/test/quote.js
@@ -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();
+});

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-shell-quote.git



More information about the Pkg-javascript-commits mailing list