Skip to content

Commit 0fbf257

Browse files
committed
Build tests: don't use a global install of rescript.
1 parent 7b206bf commit 0fbf257

File tree

59 files changed

+984
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+984
-73
lines changed

jscomp/build_tests/bs_dependencies_node_path_override/package-lock.json

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/build_tests/bs_dependencies_node_path_override/testcase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
var assert = require('assert')
33
var path = require('path')
44
var p = require('child_process')
5-
p.execSync(`rescript`, {cwd:__dirname,shell:true,encoding:'utf8',stdio:"inherit"})
5+
p.execSync(`../node_modules/.bin/rescript`, {cwd:__dirname,shell:true,encoding:'utf8',stdio:"inherit"})
66
var u = require("./examples/test.js")
77
assert.equal(path.basename(u.v),'demo.mldemo.ml')

jscomp/build_tests/bucklescript-tea/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var p = require("child_process");
22
const { assert } = require("console");
33

4-
var o = p.spawnSync(`rescript`);
4+
var o = p.spawnSync(`../node_modules/.bin/rescript`);
55

66
console.log(o.stderr + "");
77
console.log("-----");

jscomp/build_tests/case/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var p = require('child_process')
44
var assert = require('assert')
5-
var o = p.spawnSync(`rescript`,{encoding: 'utf8',cwd : __dirname})
5+
var o = p.spawnSync(`../node_modules/.bin/rescript`,{encoding: 'utf8',cwd : __dirname})
66

77

88
assert.ok(o.stderr.match(/different cases/).length > 0 )

jscomp/build_tests/case2/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var p = require("child_process");
22
var assert = require("assert");
3-
var o = p.spawnSync(`rescript`, { encoding: "utf8", cwd: __dirname });
3+
var o = p.spawnSync(`../node_modules/.bin/rescript`, { encoding: "utf8", cwd: __dirname });
44

55
assert.ok(o.stderr.match(/different cases/).length > 0);

jscomp/build_tests/case3/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var p = require("child_process");
44
var fs = require("fs");
55
var path = require("path");
66
var assert = require("assert");
7-
p.spawnSync(`rescript`, {
7+
p.spawnSync(`../node_modules/.bin/rescript`, {
88
encoding: "utf8",
99
cwd: __dirname,
1010
stdio: [0, 1, 2],

jscomp/build_tests/case3/package-lock.json

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/build_tests/cmd/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ let d = bar ()
2828

2929
function evalCode(code) {
3030
var bsc_exe = p.spawnSync(
31-
`bsc -bs-no-version-header -bs-cross-module-opt -w -40 -bs-eval '${code}'`,
31+
`../node_modules/.bin/bsc -bs-no-version-header -bs-cross-module-opt -w -40 -bs-eval '${code}'`,
3232
{
3333
encoding: "utf8",
3434
shell: true,

jscomp/build_tests/custom_namespace/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var fs = require("fs");
33
var path = require("path");
44
var assert = require("assert");
55

6-
child_process.execSync(`rescript clean -with-deps && rescript build`, {
6+
child_process.execSync(`../node_modules/.bin/rescript clean -with-deps && ../node_modules/.bin/rescript build`, {
77
cwd: __dirname,
88
stdio: [0, 1, 2],
99
});

jscomp/build_tests/customize_namespace/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
var cp = require("child_process");
44
var assert = require("assert");
5-
cp.execSync(`rescript build`, { cwd: __dirname, encoding: "utf8" });
5+
cp.execSync(`../node_modules/.bin/rescript build`, { cwd: __dirname, encoding: "utf8" });
66

77
assert.equal(require("./src/demo.bs").v, 5);

jscomp/build_tests/customize_namespace/package-lock.json

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/build_tests/cycle/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const assert = require("assert");
44
const fs = require('fs')
55
const path = require('path')
66

7-
var output = cp.spawnSync(`rescript`, { encoding: "utf8", shell: true });
7+
var output = cp.spawnSync(`../node_modules/.bin/rescript`, { encoding: "utf8", shell: true });
88

99
assert(/dependency cycle/.test(output.stdout));
1010

jscomp/build_tests/cycle/package-lock.json

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/build_tests/cycle1/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const assert = require("assert");
44
const fs = require('fs')
55
const path = require('path')
66

7-
var output = cp.spawnSync(`rescript`, { encoding: "utf8", shell: true });
7+
var output = cp.spawnSync(`../node_modules/.bin/rescript`, { encoding: "utf8", shell: true });
88

99
assert(/is dangling/.test(output.stdout));
1010

0 commit comments

Comments
 (0)