Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 

















Module talk:Text/testcases




Page contents not supported in other languages.  









Module
Talk
 

















Read
Edit
Add topic
View history
 








Tools
   


Actions  



Read
Edit
Add topic
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 

< Module talk:Text

All 109 tests passed.

testChar
Text Expected Actual
checkY
checkY {65,104,97} Aha Aha
checkY {"65",104,97} Aha Aha
checkY {98,108,97},2 blabla blabla
checkY {"something"} error error
checkY "something",1,true
checkY {7,8,9} error error
checkY {{#invoke:Text|char|65 104 97}} Aha Aha
checkY {{#invoke:Text|char|98 108 97|*=2}} blabla blabla
checkY {{#invoke:Text|char|something|errors=0}}
testConcatParams
Text Expected Actual
checkY
checkY {}
checkY A A A
checkY {"A"} A A
checkY {"A","B","C"} A|B|C A|B|C
checkY {"A","B","C"},"-" A-B-C A-B-C
checkY {"1","2","3"},nil,"%.2f" 1.00|2.00|3.00 1.00|2.00|3.00
checkY {{#invoke:Text|concatParams|1|2|3|separator=:|format=%.2f}} 1.00:2.00:3.00 1.00:2.00:3.00
testContainsCJK
Text Expected Actual
checkY false false
checkY Draco Dormiens Nunquam Titillandus false false
checkY Никогда не щекочи спящего дракона false false
checkY सोए शेर को न जगाओ false false
checkY 永远不要惊醒卧龙 true true
checkY 眠っているドラゴンをくすぐることはありません true true
checkY 잠자는 용을 간지럽히지 마십시오 true true
testExport
Text Expected Actual
checkY {{#invoke:Text|containsCJK|a}}
checkY {{#invoke:Text|containsCJK|日}} 1 1
checkY {{#invoke:Text|isLatinRange|日}}
checkY {{#invoke:Text|isLatinRange|a}} 1 1
checkY {{#invoke:Text|isQuote|日}}
checkY {{#invoke:Text|isQuote|„}} 1 1
checkY {{#invoke:Text|sentenceTerminated|日}}
checkY {{#invoke:Text|sentenceTerminated|a.}} 1 1
checkY {{#invoke:Text|getPlain|a}} a a
checkY {{#invoke:Text|removeDiacritics|a}} a a
checkY {{#invoke:Text|ucfirstAll|a}} A A
checkY {{#invoke:Text|uprightNonlatin|a}} a a
testGetPlain
Text Expected Actual
checkY a and b a and b a and b
checkY a<!--comment-->b ab ab
checkY <!--comment-->hello, world<!--comment 2--> hello, world hello, world
checkY a <nowiki>b c</nowiki> a b c a b c
checkY '''a''' a a
checkY ''b'' b b
checkY '''a''' and ''b'' a and b a and b
checkY a and b a and b a and b
checkY '''a'' and '''b'' a and b a and b
checkY a<!--I am an unclosed comment a a
checkY '''unclosed bold unclosed bold unclosed bold
checkY <!-- hello -- -->'''a''' <!--world-->''<nowiki>b</nowiki> a b a b
checkY <b>a</b> '''b'''<!-- hello -- world -->, <div style='font-size:100%;'>c</div> a b, c a b, c
testIsLatin
Text Expected Actual
checkY true true
checkY abcd true true
checkY Ça ira true true
checkY α – Ω false false
checkY a日本d false false
testIsQuote
Text Expected Actual
checkY false false
checkY " true true
checkY false false
checkY abc" false false
testListToText
Text Expected Actual
checkY
checkY {}
checkY A A A
checkY {"A"} A A
checkY {"A","B","C"} A, B and C A, B and C
checkY {"1","2","3"},"%.2f" 1.00, 2.00 and 3.00 1.00, 2.00 and 3.00
checkY {{#invoke:Text|listToText|1|2|3|format=%.2f}} 1.00, 2.00 and 3.00 1.00, 2.00 and 3.00
testQuote
Text Expected Actual
checkY “” “”
checkY abcd “abcd” “abcd”
checkY "abcd" “"abcd"” “"abcd"”
checkY fr « abcd » « abcd »
checkY fr2 ‹ abcd › ‹ abcd ›
testQuoteUnquoted
Text Expected Actual
checkY
checkY abcd “abcd” “abcd”
checkY "abcd" "abcd" "abcd"
checkY fr « abcd » « abcd »
checkY fr2 ‹ abcd › ‹ abcd ›
testRemoveDelimited
Text Expected Actual
checkY comment ab ab
checkY 2 comments hello, world hello, world
checkY ref in foo. in foo.
testRemoveDiacritics
Text Expected Actual
checkY
checkY abcd abcd abcd
checkY âbçdé abcde abcde
checkY a日本d a日本d a日本d
testSentenceTerminated
Text Expected Actual
checkY Hello false false
checkY (Hello) false false
checkY Hello. true true
checkY „Deutsche“ false false
checkY „Deutsche?“ true true
checkY "English?" true true
checkY [[Hello!]] true true
testUCFirstAll
Text Expected Actual
checkY
checkY 25 25 25
checkY Help test me Help Test Me Help Test Me
checkY an der Schönen An Der Schönen An Der Schönen
checkY an der Schönen &lauen An Der Schönen &Lauen An Der Schönen &Lauen
checkY HTML ndash An Der Schönen &Lauen Donau – X Y Z An Der Schönen &Lauen Donau – X Y Z
checkY HTML nbsp A B A B
checkY many HTML &<>  ‌‍‎‏ &<>  ‌‍‎‏
testUprightNonLatin
Text Expected Actual
checkY abc abc abc
checkY abc abc abc
checkY Mutsṭafah Mutsṭafah Mutsṭafah
checkY μm μm μm
checkY 1 α-particle 1 α-particle 1 α-particle
checkY Method 3α Method 3α Method 3α
checkY ΣΨΩ ΣΨΩ ΣΨΩ
checkY abcΣΨΩxyz abcΣΨΩxyz abcΣΨΩxyz
checkY abЩyz abЩyz abЩyz
checkY Войната 1915 година. Втора Македония Войната 1915 година. Втора Македония Войната 1915 година. Втора Македония
checkY a日本d a日本d a日本d

Retrieved from "https://en.wikipedia.org/w/index.php?title=Module_talk:Text/testcases&oldid=1064704108"





This page was last edited on 9 January 2022, at 19:58 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki