User:Rominet/Sandbox

From FlightGear wiki
Jump to navigation Jump to search

Various tests

Test of {{project infrastructure}}: GitLab

Test of {{project infrastructure|abbrev}}: gl

Test of {{User:Rominet/TestTemplate}}: {{fgdata commit}}: Missing parameter commit

FGMeta-Python repo templates

fgmeta-python source

Test of {{fgmeta-python source}} with

{{fgmeta-python source
| path = pyproject.toml
| tag  = 1.0.0b1
}}

[GitLab]/flightgear/fgmeta-python/1.0.0b1/pyproject.toml

The link text is clearly not an existing URL (the target URL is fine). Not a bug, the default link text is not supposed to be a URL. Use {{fgmeta-python url}} or pass full=1 to {{fgmeta-python source}} if you want the link text to be a URL.

Git clone with the templates

Bad git clone command, written using {{fgmeta-python source}} and its cmd parameter:

git clone [GitLab]/flightgear/fgmeta-python/next

Good git clone command, written using {{fgmeta-python clone}}:

git clone https://gitlab.com/flightgear/fgmeta-python.git

Getting a URL with the templates

URL for terrasync.py:

{{fgmeta-python url | src/flightgear/meta/scripts/terrasync/terrasync.py }}

https://gitlab.com/flightgear/fgmeta-python/blob/next/src/flightgear/meta/scripts/terrasync/terrasync.py

String substitution

Gijs kindly installed Module:String and Module:Ustring (I learnt from them at Module:String and Module:Ustring from here); let's try them:

{{#invoke:String|sub|abcde|2|4}}

⇒ bcd

{{#invoke:Ustring|sub|s1=abcde|2|4}}

⇒ bcd

{{#invoke:Ustring|sub|s1=abcde|2|50}}

⇒ bcde

{{padleft}} is available too, but isn't quite appropriate for the sake of truncating commit ids in Template:Repo_link:

{{padleft:|6|foo bar baz}}

⇒ foo ba

{{padleft:|20|foo bar baz}}

⇒ foo bar bazfoo bar b