1 | #!/usr/bin/env node
|
2 |
|
3 | require('../global');
|
4 |
|
5 | var failed = false;
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | cd(__dirname + '/../test');
|
11 | ls('*.js').forEach(function(file) {
|
12 | echo('Running test:', file);
|
13 | if (exec(JSON.stringify(process.execPath)+' '+file).code !== 123) {
|
14 | failed = true;
|
15 | echo('*** TEST FAILED! (missing exit code "123")');
|
16 | echo();
|
17 | }
|
18 | });
|
19 |
|
20 | echo();
|
21 |
|
22 | if (failed) {
|
23 | echo('*******************************************************');
|
24 | echo('WARNING: Some tests did not pass!');
|
25 | echo('*******************************************************');
|
26 | exit(1);
|
27 | } else {
|
28 | echo('All tests passed.');
|
29 | }
|