Commit graph

9 commits

Author SHA1 Message Date
Tim Starling 806ba2f110 Proper timezone tests
Bug: T223772
Depends-On: I8498527c276288feae854868a8f4b1f3205a49e8
Change-Id: Ibdc51f607042b74c648367f05066c8297f3cf0a1
2024-09-23 20:50:58 +00:00
Tim Starling 06f07b0000 Add parser functions giving access to standard date/time formats
Add parser functions #timef and #timefl, giving access to the standard
date/time formats of any language.

StubObject::unstub() is no longer required since the user language is
unstubbed in ParserOptions::__construct().

Bug: T223772
Change-Id: If158f45aad67ff017f9cd15889915b226e03f50c
2024-07-23 13:10:59 +10:00
thiemowmde 02106770a7 Add test cases for {{#if:… and such with no possible output
These are edge-cases we should make sure are covered so we don't
accidentally change how they behave.

Change-Id: Iddd08a7e752ad1fe813ed42b665e4f656c9f516c
2022-12-16 21:50:16 +01:00
thiemowmde 928a21605a Remove dead code from #titleparts implementation
It's impossible that explode() returns an empty array. This is dead
code.

Also add tests for the previously untested #titleparts function to
make sure this patch doesn't change any behavior. Including weird
usages with negative numbers.

Change-Id: Ib0d2503fdb0900bf6db3ebbc26d2ff648dbfc86d
2022-11-03 18:30:49 +01:00
C. Scott Ananian 16c50e014e Update parserTests to v2 (tidy by default)
Bug: T249138
Change-Id: I663c3919e08688354d68ced6945f6eb40265d2ac
2020-04-01 16:03:19 -04:00
Arlo Breault 5c6ef32a11 Update tests to match parser changes
Bug: T208070
Depends-On: I3da235cb83efa424f0cf1cf4fc7233240fcdf6b2
Change-Id: I47d1d9620031036b9497cacf70b34a45c3e5f409
2019-03-19 14:07:19 +00:00
Arlo Breault ae237035f1 Update tests to match parser changes
Bug: T208070
Depends-On: I3da235cb83efa424f0cf1cf4fc7233240fcdf6b2
Change-Id: I74953d5de765a2245a2999f17c7ae1cf49376bd1
2019-03-15 18:24:34 +00:00
Alexia E. Smith cf1480cb96 Fix E_WARNING with {{#pos:}} if the offset is larger than the string
The mb_strpos() function throws E_WARNING if the offset is longer
than the length of the string.

Bug: T209600
Change-Id: Ib4296ba136eaf5c8461681e9d5f108118b2494f4
2018-11-15 12:50:32 -08:00
Jayprakash12345 e6385dfb32 Update extensions to take advantage of parser test autodiscovery
Bug: T170037
Change-Id: I41d7ee671ca103097271379df83cf63d979ee709
2018-04-13 14:58:29 +00:00