User:Wladek92/sandbox/lua

Tache 0 basique Hello

cannot execute on another wikipedia -> {{:en:#invoke:Example|hello}}

Source -> Module:Sandbox/Wladek92/luatest1

correct basic call hello-> Hello World!.

correct basic call helloMonde-> Bonjour le monde !.

correct basic call Hi défaut argument pas nommé -> Hello from Lua to my friend oge.
.

correct basic call Hi argument nommé -> Hello from Lua to my friend Helen.
.

correct basic call hello_to|Sergio -> Hello, Sergio le plus beau!.

Tache: acces au frame

le type de 'frame' est -> table.

la longueur de frame est -> 0.

nombre/liste des clés -> [12] :

newTemplateParserValue
getParent
argumentPairs
extensionTag
callParserFunction
preprocess
getTitle
args
newParserValue
expandTemplate
getArgument
newChild.

accès aux paramètres nommés/non nommés |2025|p1=2020|p2=2024|1011 -> [4] :

1
2
p2
p1.


Tache 1 : appel de fonction carrousel

Source -> Module:Sandbox/Wladek92/luatest2

Flock of Cedar Waxwings3.jpg est le nom rendu du fichier

Afficher sa vignette

-- # invoke:RexxS|carousel n'existe pas ici <- issu de https://en.wikipedia.org/wiki/Module:Carousel

District_destinations.jpg


testcases

Category:Template test cases#Wladek92/sandbox/luaCategory:Template test cases#Wladek92/sandbox/lua

Source -> Module:Sandbox/Wladek92/luatest2

  • {{#invoke:Sandbox/Wladek92/luatest2 | main | name=Komodobish | switchsecs = 5}}Komodo dragon overview 3.png
  • {{#invoke:Sandbox/Wladek92/luatest2 | main | name= | switchsecs = 1}}48 Komodo Komodo Island Indonesia.jpg
  • {{#invoke:Sandbox/Wladek92/luatest2 | main | name=Shonen | switchsecs = 5}}The Fairybread Barnstar.gif

[[File:{{#invoke:Sandbox/Wladek92/luatest2 | main | name=54129 | switchsecs = 5}} | upright=2.27 | center | thumb | message goes here]]

File:District destinations.jpg
message goes here
  • {{#invoke:Sandbox/Wladek92/luatest2 | main | name=54129 | switchsecs = 5}}District_destinations.jpg

Errors:

  • {{#invoke:Sandbox/Wladek92/luatest2 | main}}Lua error in mw.text.lua at line 25: bad argument #1 to 'match' (string expected, got nil).
  • {{#invoke:Sandbox/Wladek92/luatest2 | main | switchsecs = 10}}Lua error in mw.text.lua at line 25: bad argument #1 to 'match' (string expected, got nil).
Category:Template test cases Category:User pages with broken file links Category:User pages with script errors