[Pkg-javascript-commits] [node-cross-spawn] 04/11: Patch upstream test suite to work in Debian
Ross Gammon
ross-guest at moszumanska.debian.org
Sun Nov 15 11:59:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
ross-guest pushed a commit to branch master
in repository node-cross-spawn.
commit 8fb96212a434a68263165f7f5380cfe84926a981
Author: Ross Gammon <rossgammon at mail.dk>
Date: Sun Nov 15 12:26:32 2015 +0100
Patch upstream test suite to work in Debian
---
debian/patches/nodejs_test.patch | 71 ++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 3 ++
debian/patches/shebang.patch | 13 ++++++++
3 files changed, 87 insertions(+)
diff --git a/debian/patches/nodejs_test.patch b/debian/patches/nodejs_test.patch
new file mode 100644
index 0000000..c656883
--- /dev/null
+++ b/debian/patches/nodejs_test.patch
@@ -0,0 +1,71 @@
+Description: Fix test.js to use nodejs
+ In Debian, nodejs is the name of the node executable. This fix was
+ required to enable the upstream tests to pass.
+Forwarded: not-needed
+Author: Ross Gammon <rossgammon at mail.dk>
+
+--- node-cross-spawn.orig/test/test.js
++++ node-cross-spawn/test/test.js
+@@ -67,7 +67,7 @@
+ });
+
+ it('should handle empty arguments', function (next) {
+- buffered(method, 'node', [
++ buffered(method, 'nodejs', [
+ __dirname + '/fixtures/echo',
+ 'foo',
+ '',
+@@ -92,7 +92,7 @@
+ });
+
+ it('should handle non-string arguments', function (next) {
+- buffered(method, 'node', [
++ buffered(method, 'nodejs', [
+ __dirname + '/fixtures/echo',
+ 1234
+ ], function (err, data, code) {
+@@ -105,7 +105,7 @@
+ });
+
+ it('should handle arguments with spaces', function (next) {
+- buffered(method, 'node', [
++ buffered(method, 'nodejs', [
+ __dirname + '/fixtures/echo',
+ 'I am',
+ 'André Cruz'
+@@ -119,7 +119,7 @@
+ });
+
+ it('should handle arguments with \\"', function (next) {
+- buffered(method, 'node', [
++ buffered(method, 'nodejs', [
+ __dirname + '/fixtures/echo',
+ 'foo',
+ '\\"',
+@@ -134,7 +134,7 @@
+ });
+
+ it('should handle arguments that end with \\', function (next) {
+- buffered(method, 'node', [
++ buffered(method, 'nodejs', [
+ __dirname + '/fixtures/echo',
+ 'foo',
+ 'bar\\',
+@@ -149,7 +149,7 @@
+ });
+
+ it('should handle arguments that contain shell special chars', function (next) {
+- buffered(method, 'node', [
++ buffered(method, 'nodejs', [
+ __dirname + '/fixtures/echo',
+ 'foo',
+ '()',
+@@ -242,7 +242,7 @@
+ });
+
+ it('should give correct exit code', function (next) {
+- buffered(method, 'node', [__dirname + '/fixtures/exit'], function (err, data, code) {
++ buffered(method, 'nodejs', [__dirname + '/fixtures/exit'], function (err, data, code) {
+ expect(err).to.not.be.ok();
+ expect(code).to.be(25);
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d44e048
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+nodejs_test.patch
+spawn-sync.patch
+shebang.patch
diff --git a/debian/patches/shebang.patch b/debian/patches/shebang.patch
new file mode 100644
index 0000000..9f950b6
--- /dev/null
+++ b/debian/patches/shebang.patch
@@ -0,0 +1,13 @@
+Description: Fix shebang in upstream test
+ In Debian, nodejs is the name of the node executable. This fix was
+ required to enable the upstream tests to pass.
+Forwarded: not-needed
+Author: Ross Gammon <rossgammon at mail.dk>
+
+--- node-cross-spawn.orig/test/fixtures/shebang
++++ node-cross-spawn/test/fixtures/shebang
+@@ -1,3 +1,3 @@
+-#!/usr/bin/env node
++#!/usr/bin/env nodejs
+
+ process.stdout.write('shebang works!');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-cross-spawn.git
More information about the Pkg-javascript-commits
mailing list