[Pkg-javascript-commits] [node-browser-pack] 56/141: passing unicode test

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:23:24 UTC 2017


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

rouca pushed a commit to branch master
in repository node-browser-pack.

commit adefffc2ebc3aa4aa4de9102efabcc363fda2bb7
Author: James Halliday <mail at substack.net>
Date:   Sun Jun 23 01:19:57 2013 -0700

    passing unicode test
---
 test/unicode.js | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/test/unicode.js b/test/unicode.js
new file mode 100644
index 0000000..7cbf748
--- /dev/null
+++ b/test/unicode.js
@@ -0,0 +1,32 @@
+var test = require('tape');
+var pack = require('../');
+
+test('unicode', function (t) {
+    t.plan(5);
+    
+    var p = pack({ raw: true });
+    var src = '';
+    p.on('data', function (buf) { src += buf });
+    p.on('end', function () {
+        var r = Function(['Ṫ'], 'return ' + src)(t);
+        t.equal(r('xyz')(5), 555);
+        t.equal(r('xyz')(5), 555);
+        t.throws(function() {
+            r('zzz');
+        }, /Cannot find module 'zzz'/);
+    });
+    
+    p.write({
+        id: 'abc',
+        source: 'Ṫ.equal(require("./xyz")(3), 333)',
+        entry: true,
+        deps: { './xyz': 'xyz' }
+    });
+    
+    p.write({
+        id: 'xyz',
+        source: 'Ṫ.ok(true); module.exports=function(ñ){return ñ*111}'
+    });
+    
+    p.end();
+});

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



More information about the Pkg-javascript-commits mailing list