Go to file
Thiemo Kreuz a00b8d990d Add test cases for impossible follow vs. rollback edge case
While working on the patch I4303642 I was worried about the line

array_pop( $this->refCallStack )

in the rollback code. Since the patch changed the position of follow
elements in the stack, an array_pop() would pop different elements.

It turns out this is impossible. Rollbacks are only done for <ref>
elements inside a <references> tag, immediatelly after reaching the
closing </references>. It's impossible to use follow="…" inside
<references>. It will not be added to the stack, and therefore not
rolled back.

Even if the edge case would be possible, the *old* code that placed
follow elements on the *other* side of the stack would have been
wrong then.

The test cases in this patch try to hit this edge case, and are
expected to not be able to do so.

Change-Id: I4380bf443db17c6214dbfa2cbda62b46db04258a
2020-04-01 09:03:19 +00:00
.phan build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0 2019-05-19 11:26:43 +00:00
i18n Localisation updates from https://translatewiki.net. 2020-04-01 08:24:32 +02:00
modules Localisation updates from https://translatewiki.net. 2020-04-01 08:24:32 +02:00
src Merge "Add a newline in wikitext before autogenerated reflist" 2020-03-31 19:37:34 +00:00
tests Add test cases for impossible follow vs. rollback edge case 2020-04-01 09:03:19 +00:00
.eslintrc.json build: Update linters 2019-11-15 16:27:21 +00:00
.gitignore build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0 2019-04-03 22:58:56 +00:00
.gitreview
.phpcs.xml Fix all remaining PHPCS issues 2020-01-20 11:13:47 +01:00
.stylelintrc.json Use json extension for .stylelintrc 2017-08-19 09:39:19 +02:00
AUTHORS.txt Fix expected remove data to match actual remove data exactly 2017-08-13 11:41:30 -04:00
CODE_OF_CONDUCT.md build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-02 23:29:58 +00:00
composer.json build: Updating composer dependencies 2020-02-19 01:25:06 +00:00
COPYING.txt
extension.json Remove misleading version number 1.0.0 2020-01-10 21:31:38 +01:00
Gruntfile.js build: Update linters 2019-11-15 16:27:21 +00:00
MIT-LICENSE.txt doc: Bump copyright year 2018-01-02 17:05:50 -08:00
package-lock.json build: Updating gonzales-pe to 4.3.0 2020-03-31 00:54:54 +00:00
package.json build: Updating minimist to 1.2.5 2020-03-18 04:41:02 +00:00
README.md Remove ApiQueryReferences support 2019-11-28 11:08:46 +01:00

Cite

The Cite extension provides a way for users to create references as footnotes to articles.

See https://www.mediawiki.org/wiki/Extension:Cite for detailed documentation.