Actually increment the errors counter on failures in test-fixtures.js/test_fixtures_esprima.js, so that the test runners won't incorrectly report that the tests passed

This commit is contained in:
Jonas Jenwald 2017-01-10 14:32:40 +01:00
parent cf00516f04
commit fe9a561d45
2 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,8 @@ ls('*-expected.*').forEach(function(expectationFilename) {
out = ('Error: ' + e.message).replace(/^/gm, '//'); out = ('Error: ' + e.message).replace(/^/gm, '//');
} }
if (out !== expectation) { if (out !== expectation) {
errors++;
echo('Assertion failed for ' + inFilename); echo('Assertion failed for ' + inFilename);
echo('--------------------------------------------------'); echo('--------------------------------------------------');
echo('EXPECTED:'); echo('EXPECTED:');

View File

@ -33,6 +33,8 @@ ls('*-expected.*').forEach(function(expectationFilename) {
out = ('Error: ' + e.message).replace(/^/gm, '//'); out = ('Error: ' + e.message).replace(/^/gm, '//');
} }
if (out !== expectation) { if (out !== expectation) {
errors++;
echo('Assertion failed for ' + inFilename); echo('Assertion failed for ' + inFilename);
echo('--------------------------------------------------'); echo('--------------------------------------------------');
echo('EXPECTED:'); echo('EXPECTED:');