!! Version 2 # LanguageConverter parser tests ## sr-ec ## !! test sr-ec: Simple conversion of Latin to Cyrillic !! options language=sr variant=sr-ec !! wikitext abvg !! html/php
абвг
!! html/parsoidabvg
!! html/parsoid+langconvабвг
!! end !! test sr-ec: Same as above, but assert that -{}-s must be removed and not converted (1) !! options language=sr variant=sr-ec !! wikitext -{lj}-аб-{nj}-вг-{dž}- !! html/phpljабnjвгdž
!! html/parsoidабвг
!! html/parsoid+langconvljабnjвгdž
!! end !! test sr-ec: This text has some Cyrillic, but is recognized as Latin, so it should be converted !! options language=sr variant=sr-ec !! wikitext абвгšđžčć !! html/phpабвгшђжчћ
!! html/parsoidабвгšđžčć
!! html/parsoid+langconvабвгшђжчћ
!! end !! test sr-ec: Same as above, but assert that -{}-s must be removed and not converted (2) !! options language=sr variant=sr-ec !! wikitext -{lj}-абвг-{nj}-šđžčć-{dž}- !! html/phpljабвгnjшђжчћdž
!! html/parsoidабвгšđžčć
!! html/parsoid+langconvljабвгnjшђжчћdž
!! end !! test sr-ec: Roman numerals are not converted !! options language=sr variant=sr-ec !! wikitext a I b II v III g IV šđžčć !! html/phpа I б II в III г IV шђжчћ
!! html/parsoida I b II v III g IV šđžčć
!! html/parsoid+langconvа I б II в III г IV шђжчћ
!! end ## sr-el ## !! test sr-el: A simple conversion of Latin to Latin !! options language=sr variant=sr-el !! wikitext abcd !! html/phpabcd
!! html/parsoidabcd
!! html/parsoid+langconvabcd
!! end !! test sr-el: A simple conversion of Cyrillic to Latin !! options language=sr variant=sr-el !! wikitext абцд !! html/phpabcd
!! html/parsoidабцд
!! html/parsoid+langconvabcd
!! end !! test sr-el: This text has some Latin, but is recognized as Cyrillic, so it should be converted !! options language=sr variant=sr-el !! wikitext abcdшђжчћ !! html/phpabcdšđžčć
!! html/parsoidabcdшђжчћ
!! html/parsoid+langconvabcdšđžčć
!! end !! test External links should be converted, unless they "look like a URL". !! options language=sr variant=sr-ec !! wikitext [http://example.com abcd] [http://example.com http://foo.com] http://example.com [http://example.com -{abcd}-] !! html/php !! html/parsoid !! html/parsoid+langconv !! end