[Pkg-javascript-commits] [node-module-deps] 45/444: update tr_sh test for removed command strings

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:41 UTC 2017


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

rouca pushed a commit to branch master
in repository node-module-deps.

commit 6daadad87d3645d6140d5e3ecea374b70b852b0a
Author: James Halliday <mail at substack.net>
Date:   Wed Feb 27 16:59:58 2013 -0800

    update tr_sh test for removed command strings
---
 test/files/tr_sh/node_modules/g/tr_g.js | 6 ++++++
 test/files/tr_sh/tr_a.js                | 6 ++++++
 test/files/tr_sh/tr_b.js                | 6 ++++++
 test/tr_sh.js                           | 2 +-
 4 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/test/files/tr_sh/node_modules/g/tr_g.js b/test/files/tr_sh/node_modules/g/tr_g.js
new file mode 100644
index 0000000..87b5fa3
--- /dev/null
+++ b/test/files/tr_sh/node_modules/g/tr_g.js
@@ -0,0 +1,6 @@
+var through = require('through');
+module.exports = function (file) {
+    return through(function (buf) {
+        this.queue(String(buf).replace(/GGG/g, '111'));
+    });
+};
diff --git a/test/files/tr_sh/tr_a.js b/test/files/tr_sh/tr_a.js
new file mode 100644
index 0000000..12306a3
--- /dev/null
+++ b/test/files/tr_sh/tr_a.js
@@ -0,0 +1,6 @@
+var through = require('through');
+module.exports = function (file) {
+    return through(function (buf) {
+        this.queue(String(buf).replace(/AAA/g, '5'));
+    });
+};
diff --git a/test/files/tr_sh/tr_b.js b/test/files/tr_sh/tr_b.js
new file mode 100644
index 0000000..7c23d33
--- /dev/null
+++ b/test/files/tr_sh/tr_b.js
@@ -0,0 +1,6 @@
+var through = require('through');
+module.exports = function (file) {
+    return through(function (buf) {
+        this.queue(String(buf).replace(/BBB/g, '50'));
+    });
+};
diff --git a/test/tr_sh.js b/test/tr_sh.js
index 8e778b2..f6a5c60 100644
--- a/test/tr_sh.js
+++ b/test/tr_sh.js
@@ -6,7 +6,7 @@ var packer = require('browser-pack');
 test('transform', function (t) {
     t.plan(3);
     var p = mdeps(__dirname + '/files/tr_sh/main.js', {
-        transform: [ 'sed s/AAA/5/', 'sed s/BBB/50/' ],
+        transform: [ './tr_a.js', './tr_b.js' ],
         transformKey: [ 'browserify', 'transform' ]
     });
     var pack = packer();

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



More information about the Pkg-javascript-commits mailing list