Page MenuHomePhabricator

Use triple equals in abuse filter parser tests
Closed, ResolvedPublic

Description

Most of the AbuseFilter parser tests correctly use === but some still use =. This search can help identify them. They should be updated to use triple equals.

Event Timeline

Huji triaged this task as Lowest priority.Sep 4 2020, 3:58 PM

Good idea, but we should make sure to keep some tests for the "weak" version. This should probably be a dedicated test file.

I think what we should do is to specifically create a test file in which two things are compared, once with = (in which they come out as true) and once with === (in which they come out as false).

Change 624785 had a related patch set uploaded (by Huji; owner: Huji):
[mediawiki/extensions/AbuseFilter@master] Use triple equals in abuse filter parser tests

https://gerrit.wikimedia.org/r/624785

I think what we should do is to specifically create a test file in which two things are compared, once with = (in which they come out as true) and once with === (in which they come out as false).

@Daimona, what you requested further above and I explianed in the quoted comment is now done in tests/parserTests/mwexamples-comparisons.t file in the patch.

Change 624785 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Use triple equals in abuse filter parser tests

https://gerrit.wikimedia.org/r/624785

Daimona removed a project: Patch-For-Review.