Merge "Use triple equals in abuse filter parser tests"

This commit is contained in:
jenkins-bot 2020-10-06 17:42:29 +00:00 committed by Gerrit Code Review
commit c6ab7b8e1f
10 changed files with 39 additions and 10 deletions

View file

@ -0,0 +1,30 @@
(2 = 2) &
(2 == 2) &
(2 === 2) &
('2' = 2) &
('2' == 2) &
('2' !== 2) &
(['1','2'] = ['1','2']) &
(['1','2'] == ['1','2']) &
(['1','2'] === ['1','2']) &
(['1','2'] != ['2','1']) &
(['1','2'] = ['1',2]) &
(['1','2'] == ['1',2]) &
(['1','2'] !== ['1',2]) &
(true = 1) &
(true == 1) &
(true !== 1) &
(false != 0) &
(false = '') &
(false == '') &
(false !== '') &
(false = []) &
(false == []) &
(false !== []) &
(false = null) &
(false == null) &
(false !== null) &
([] = null) &
([] == null) &
([] !== null) &
([] != '')

View file

@ -1 +1 @@
lcase("FÁmí") = "fámí"
lcase("FÁmí") === "fámí"

View file

@ -19,4 +19,3 @@
([] == false) &
([] == null) &
!(['1'] == '1')

View file

@ -1 +1 @@
(1 + 2 * 3 = 7) & (2 ** 2 * 2 = 8) & (1 - 1 - 1 = -1)
(1 + 2 * 3 === 7) & (2 ** 2 * 2 === 8) & (1 - 1 - 1 === -1)

View file

@ -1,3 +1,3 @@
rcount("a,b,c,d") = 4 &
rcount(".", "abcd") = 4
rcount("a,b,c,d") === 4 &
rcount(".", "abcd") === 4

View file

@ -1 +1 @@
rmdoubles("foobarééqq") = "fobaréq"
rmdoubles("foobarééqq") === "fobaréq"

View file

@ -1 +1 @@
rmspecials("foo;bar!") = "foobar"
rmspecials("foo;bar!") === "foobar"

View file

@ -1 +1 @@
sanitize('یک') = 'یک'
sanitize('یک') === 'یک'

View file

@ -1 +1 @@
ucase("FÁmí") = "FÁMÍ"
ucase("FÁmí") === "FÁMÍ"

View file

@ -16,6 +16,6 @@ removed_lines_test := ['<ref name="bah">test</ref><ref name="wah">test2</ref>'];
/*Counts of more reference tags are removed than added */
& (rcount("(<ref>|<ref\sname|</ref>)",removed_lines_test) > rcount("(<ref>|<ref\sname|</ref>)",added_lines_test))
/*Excludes changing to the named reference format and removing closing tags attached to formerly named refs. Unequality is to account for closing the first named tag */
& !(rcount("<ref>",removed_lines_test) = rcount("<ref\sname",added_lines_test) | rcount("</ref>",removed_lines_test) <= rcount("<ref\sname",added_lines_test))
& !(rcount("<ref>",removed_lines_test) === rcount("<ref\sname",added_lines_test) | rcount("</ref>",removed_lines_test) <= rcount("<ref\sname",added_lines_test))
/*Excludes removal of references to Wikipedia itself */
& !(count("http://en.wikipedia.org",string(removed_lines_test)) > count("http://en.wikipedia.org",string(added_lines_test)))