We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
--version
package.json
1 parent 3c2ed50 commit 9a16f3dCopy full SHA for 9a16f3d
test/cli.ts
@@ -1,12 +1,13 @@
1
import tape from 'tape';
2
import spawn from 'tape-spawn';
3
import * as path from 'path';
4
-const pkg = require('../package.json');
+import solc from '../';
5
6
tape('CLI', function (t) {
7
t.test('--version', function (st) {
8
const spt = spawn(st, './solc.js --version');
9
- spt.stdout.match(RegExp(pkg.version + '(-[^a-zA-A0-9.+]+)?(\\+[^a-zA-Z0-9.-]+)?'));
+ spt.stdout.match(solc.version() + '\n');
10
+ spt.stdout.match(/^\s*[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?\+commit\.[0-9a-f]+([a-zA-Z0-9.-]+)?\s*$/);
11
spt.stderr.empty();
12
spt.end();
13
});
0 commit comments