mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-12-18 08:30:52 +00:00
8cfd527f31
Some of them are actually too simple, and may be unuseful in tricky situations. This patch adds a lot of test cases to provide an (almost) bombproof safety with future patches. Depends-On: I0bb1ed0109af66997e238b532d342d82d4c4ae19 Change-Id: I274ef306775c36be20acb662353f6537ff3f1a33
27 lines
530 B
Perl
27 lines
530 B
Perl
(1 + 1 === 2) &
|
|
(1.5 + 1.5 === 3.0) &
|
|
(2.5 + 1 === 3.5) &
|
|
(0 + 1 === 1) &
|
|
(2.5 + 0 === 2.5) &
|
|
(5 - 3 === 2) &
|
|
(5 - 3.5 === 1.5) &
|
|
(5.5 - 3.5 === 2.0) &
|
|
(1 - 0 === 1) &
|
|
(2.5 - 0 === 2.5) &
|
|
(2 * 3 === 6) &
|
|
(2 * 3.5 === 7.0) &
|
|
(2.5 * 3.5 === 8.75) &
|
|
(2.5 * 0 === 0.0) &
|
|
(10 / 2 === 5) &
|
|
(10 / 2.5 === 4.0) &
|
|
(18 / 36 === 0.5) &
|
|
(0 / 36 === 0) &
|
|
(12.5 / 2.5 === 5.0) &
|
|
(10.5 / 2.5 === 4.2) &
|
|
(10 % 7 === 3) &
|
|
(10.48762 % 7 === 3) &
|
|
(10 % 7.123576 === 3) &
|
|
(2 ** 4 === 16) &
|
|
(2.5 ** 2 === 6.25) &
|
|
(2.5 ** 0 === 1.0) &
|
|
(1000 ** 0 === 1) |