2015-09-04 16:52:38 +02:00
|
|
|
/* jshint jasmine:true */
|
|
|
|
/* global PEG */
|
2015-06-08 20:21:19 +02:00
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
2012-04-30 11:47:04 +02:00
|
|
|
describe("compiler pass |reportMissingRules|", function() {
|
2013-01-13 11:17:44 +01:00
|
|
|
var pass = PEG.compiler.passes.check.reportMissingRules;
|
2012-04-30 11:47:04 +02:00
|
|
|
|
2014-06-07 09:11:00 +02:00
|
|
|
it("reports missing rules", function() {
|
|
|
|
expect(pass).toReportError('start = missing', {
|
2015-04-06 10:34:07 +02:00
|
|
|
message: 'Referenced rule "missing" does not exist.',
|
|
|
|
location: {
|
|
|
|
start: { offset: 8, line: 1, column: 9 },
|
|
|
|
end: { offset: 15, line: 1, column: 16 }
|
|
|
|
}
|
2012-04-30 11:47:04 +02:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|