Skip to content

Commit 814f08a

Browse files
axicStephen Lineker-Miller
andcommitted
Rename solcjs to solc.js internally
Mostly in order to include it in linting Co-authored-by: Stephen Lineker-Miller <[email protected]>
1 parent 525a290 commit 814f08a

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Solidity compiler",
55
"main": "index.js",
66
"bin": {
7-
"solcjs": "solcjs"
7+
"solcjs": "solc.js"
88
},
99
"scripts": {
1010
"lint": "eslint .",
@@ -34,7 +34,7 @@
3434
"linker.js",
3535
"smtchecker.js",
3636
"smtsolver.js",
37-
"solcjs",
37+
"solc.js",
3838
"soljson.js",
3939
"translate.js",
4040
"wrapper.js"

solcjs renamed to solc.js

File renamed without changes.

test/cli.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,72 +5,72 @@ const pkg = require('../package.json');
55

66
tape('CLI', function (t) {
77
t.test('--version', function (st) {
8-
const spt = spawn(st, './solcjs --version');
8+
const spt = spawn(st, './solc.js --version');
99
spt.stdout.match(RegExp(pkg.version + '(-[^a-zA-A0-9.+]+)?(\\+[^a-zA-Z0-9.-]+)?'));
1010
spt.stderr.empty();
1111
spt.end();
1212
});
1313

1414
t.test('no parameters', function (st) {
15-
const spt = spawn(st, './solcjs');
15+
const spt = spawn(st, './solc.js');
1616
spt.stderr.match(/^Must provide a file/);
1717
spt.end();
1818
});
1919

2020
t.test('no mode specified', function (st) {
21-
const spt = spawn(st, './solcjs test/resources/fixtureSmoke.sol');
21+
const spt = spawn(st, './solc.js test/resources/fixtureSmoke.sol');
2222
spt.stderr.match(/^Invalid option selected/);
2323
spt.end();
2424
});
2525

2626
t.test('--bin', function (st) {
27-
const spt = spawn(st, './solcjs --bin test/resources/fixtureSmoke.sol');
27+
const spt = spawn(st, './solc.js --bin test/resources/fixtureSmoke.sol');
2828
spt.stderr.empty();
2929
spt.succeeds();
3030
spt.end();
3131
});
3232

3333
t.test('--bin --optimize', function (st) {
34-
const spt = spawn(st, './solcjs --bin --optimize test/resources/fixtureSmoke.sol');
34+
const spt = spawn(st, './solc.js --bin --optimize test/resources/fixtureSmoke.sol');
3535
spt.stderr.empty();
3636
spt.succeeds();
3737
spt.end();
3838
});
3939

4040
t.test('--bin --optimize-runs 666', function (st) {
41-
const spt = spawn(st, './solcjs --bin --optimize-runs 666 test/resources/fixtureSmoke.sol');
41+
const spt = spawn(st, './solc.js --bin --optimize-runs 666 test/resources/fixtureSmoke.sol');
4242
spt.stderr.empty();
4343
spt.succeeds();
4444
spt.end();
4545
});
4646

4747
t.test('--bin --optimize-runs not-a-number', function (st) {
48-
const spt = spawn(st, './solcjs --bin --optimize-runs not-a-number test/resources/fixtureSmoke.sol');
48+
const spt = spawn(st, './solc.js --bin --optimize-runs not-a-number test/resources/fixtureSmoke.sol');
4949
spt.stderr.match(/^error: option '--optimize-runs <optimize-runs>' argument 'not-a-number' is invalid/);
5050
spt.end();
5151
});
5252

5353
t.test('invalid file specified', function (st) {
54-
const spt = spawn(st, './solcjs --bin test/fileNotFound.sol');
54+
const spt = spawn(st, './solc.js --bin test/fileNotFound.sol');
5555
spt.stderr.match(/^Error reading /);
5656
spt.end();
5757
});
5858

5959
t.test('incorrect source source', function (st) {
60-
const spt = spawn(st, './solcjs --bin test/resources/fixtureIncorrectSource.sol');
60+
const spt = spawn(st, './solc.js --bin test/resources/fixtureIncorrectSource.sol');
6161
spt.stderr.match(/SyntaxError: Invalid pragma "contract"/);
6262
spt.end();
6363
});
6464

6565
t.test('--abi', function (st) {
66-
const spt = spawn(st, './solcjs --abi test/resources/fixtureSmoke.sol');
66+
const spt = spawn(st, './solc.js --abi test/resources/fixtureSmoke.sol');
6767
spt.stderr.empty();
6868
spt.succeeds();
6969
spt.end();
7070
});
7171

7272
t.test('--bin --abi', function (st) {
73-
const spt = spawn(st, './solcjs --bin --abi test/resources/fixtureSmoke.sol');
73+
const spt = spawn(st, './solc.js --bin --abi test/resources/fixtureSmoke.sol');
7474
spt.stderr.empty();
7575
spt.succeeds();
7676
spt.end();
@@ -79,7 +79,7 @@ tape('CLI', function (t) {
7979
t.test('no base path', function (st) {
8080
const spt = spawn(
8181
st,
82-
'./solcjs --bin ' +
82+
'./solc.js --bin ' +
8383
'test/resources/importA.sol ' +
8484
'./test/resources//importA.sol ' +
8585
path.resolve('test/resources/importA.sol')
@@ -95,7 +95,7 @@ tape('CLI', function (t) {
9595
// by the import callback when it appends the base path back.
9696
const spt = spawn(
9797
st,
98-
'./solcjs --bin --base-path test/resources ' +
98+
'./solc.js --bin --base-path test/resources ' +
9999
'test/resources/importA.sol ' +
100100
'./test/resources//importA.sol ' +
101101
path.resolve('test/resources/importA.sol')
@@ -108,7 +108,7 @@ tape('CLI', function (t) {
108108
t.test('relative non canonical base path', function (st) {
109109
const spt = spawn(
110110
st,
111-
'./solcjs --bin --base-path ./test/resources ' +
111+
'./solc.js --bin --base-path ./test/resources ' +
112112
'test/resources/importA.sol ' +
113113
'./test/resources//importA.sol ' +
114114
path.resolve('test/resources/importA.sol')
@@ -121,7 +121,7 @@ tape('CLI', function (t) {
121121
t.test('absolute base path', function (st) {
122122
const spt = spawn(
123123
st,
124-
'./solcjs --bin --base-path ' + path.resolve('test/resources') + ' ' +
124+
'./solc.js --bin --base-path ' + path.resolve('test/resources') + ' ' +
125125
'test/resources/importA.sol ' +
126126
'./test/resources//importA.sol ' +
127127
path.resolve('test/resources/importA.sol')
@@ -134,7 +134,7 @@ tape('CLI', function (t) {
134134
t.test('include paths', function (st) {
135135
const spt = spawn(
136136
st,
137-
'./solcjs --bin ' +
137+
'./solc.js --bin ' +
138138
'test/resources/importCallback/base/contractB.sol ' +
139139
'test/resources/importCallback/includeA/libY.sol ' +
140140
'./test/resources/importCallback/includeA//libY.sol ' +
@@ -151,7 +151,7 @@ tape('CLI', function (t) {
151151
t.test('include paths without base path', function (st) {
152152
const spt = spawn(
153153
st,
154-
'./solcjs --bin ' +
154+
'./solc.js --bin ' +
155155
'test/resources/importCallback/contractC.sol ' +
156156
'--include-path test/resources/importCallback/includeA'
157157
);
@@ -163,7 +163,7 @@ tape('CLI', function (t) {
163163
t.test('empty include paths', function (st) {
164164
const spt = spawn(
165165
st,
166-
'./solcjs --bin ' +
166+
'./solc.js --bin ' +
167167
'test/resources/importCallback/contractC.sol ' +
168168
'--base-path test/resources/importCallback/base ' +
169169
'--include-path='
@@ -189,7 +189,7 @@ tape('CLI', function (t) {
189189
}
190190
}
191191
};
192-
const spt = spawn(st, './solcjs --standard-json');
192+
const spt = spawn(st, './solc.js --standard-json');
193193
spt.stdin.setEncoding('utf-8');
194194
spt.stdin.write(JSON.stringify(input));
195195
spt.stdin.end();
@@ -218,7 +218,7 @@ tape('CLI', function (t) {
218218
}
219219
}
220220
};
221-
const spt = spawn(st, './solcjs --standard-json --base-path test/resources');
221+
const spt = spawn(st, './solc.js --standard-json --base-path test/resources');
222222
spt.stdin.setEncoding('utf-8');
223223
spt.stdin.write(JSON.stringify(input));
224224
spt.stdin.end();
@@ -244,7 +244,7 @@ tape('CLI', function (t) {
244244
};
245245
const spt = spawn(
246246
st,
247-
'./solcjs --standard-json ' +
247+
'./solc.js --standard-json ' +
248248
'--base-path test/resources/importCallback/base ' +
249249
'--include-path test/resources/importCallback/includeA ' +
250250
'--include-path ' + path.resolve('test/resources/importCallback/includeB/')

0 commit comments

Comments
 (0)