Description
The Ability regex does not overmatch unit test in test/unittests/regex_test.ts is silently ignored
Additional Details / Steps to Reproduce
You can reproduce the issue by running the test with an intentional failure.
logDefsToTest.forEach((type) => {
it(type, () => {
const baseFunc = (params?: RegexUtilParams) => buildRegex(type, params);
const Helper = new RegexTestUtil(type, examples[type], baseFunc, true);
Helper.run();
if (type === 'Ability')
it('Ability regex does not overmatch', () => {
// Tests a bug where a :1E: later in the line would be caught by overzealous
// matchers on source names.
// TODO: Preserved for historical reasons - maybe remove?
const testLine =
'[20:29:39.392] ActionEffect 15:107B9AC8:Tako Yaki:07:Attack:40017D58:Daxio:710003:DC0000:1E:50000:1C:1B60000:550003:2CA000:0:0:0:0:0:0:0:0:8207:24837:7230:7230:0:1000:527.5806:-362.7833:-19.61513:2.898741:8998:8998:10000:10000:0:1000:528.6487:-365.8656:-22.08109:-0.3377206:000AD7BF:0:1';
Helper.captureTest((params?: RegexUtilParams) => Regexes.ability(params), [testLine]);
const abilityHallowed = Regexes.ability({ id: '1E' });
assert.isNull(testLine.match(abilityHallowed));
assert.ok(false); //
});
});
});
Additionally, while modifying the test to run, I noticed that the following test failed.
Helper.captureTest((params?: RegexUtilParams) => Regexes.ability(params), [testLine]);
Cactbot Module
Dev Tools / Internals
Configuration Info
commit: 11da0d0
Log & Screenshots
No response
Confirmation
Description
The
Ability regex does not overmatchunit test intest/unittests/regex_test.tsis silently ignoredAdditional Details / Steps to Reproduce
You can reproduce the issue by running the test with an intentional failure.
Additionally, while modifying the test to run, I noticed that the following test failed.
Cactbot Module
Dev Tools / Internals
Configuration Info
commit: 11da0d0
Log & Screenshots
No response
Confirmation