Skip to content

Commit 41d674b

Browse files
authored
Merge pull request #278 from ethereum/solcjs-test
Add failing test for solcjs
2 parents 5f7375f + ef61e2d commit 41d674b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

test/cli.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ tape('CLI', function (t) {
4343
spt.end();
4444
});
4545

46+
t.test('incorrect source source', function (st) {
47+
var spt = spawn(st, './solcjs --bin test/fixtureIncorrectSource.sol');
48+
spt.stderr.match(/^test\/fixtureIncorrectSource.sol:1:1: SyntaxError: Invalid pragma "contract"/);
49+
spt.end();
50+
});
51+
4652
t.test('--abi', function (st) {
4753
var spt = spawn(st, './solcjs --abi test/' + daodir + '/Token.sol');
4854
spt.stderr.empty();

test/fixtureIncorrectSource.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pragma contract;

0 commit comments

Comments
 (0)