Files
RedBear-OS/local/recipes/kde/kf6-syntaxhighlighting/source/autotests/html/test.robot.html
T

140 lines
12 KiB
HTML

<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>test.robot</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Robot) - Theme (Breeze Light)"/>
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre>
<span style="color:#ff5500">*** Comments ***</span>
<span style="color:#898887">Some comments go here</span>
<span style="color:#898887">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam a quam erat.</span>
<span style="color:#898887">Nam ante lorem, placerat et est a, blandit rutrum magna. Vivamus congue ipsum eget neque posuere, nec egestas risus cursus. Proin nec interdum orci.</span>
<span style="color:#898887">Vivamus blandit, elit sed vehicula lobortis, orci massa malesuada nibh, at rutrum lacus quam a metus. Donec velit magna, pulvinar eget metus eu, aliquet sagittis ante.</span>
<span style="color:#898887"> ... Donec egestas neque vel libero finibus hendrerit. Nam tempus quam ut mi interdum vulputate. Mauris ac auctor magna.</span>
<span style="color:#898887">Maecenas sollicitudin, tortor nec auctor pellentesque, sapien neque accumsan enim, quis porttitor magna est non nibh.</span>
<span style="color:#898887">Pellentesque facilisis luctus nulla, ut dignissim ligula vestibulum ac. Sed sit amet eros non turpis congue facilisis vitae vitae orci.</span>
<span style="color:#898887">Morbi et lobortis nibh. Proin blandit, diam ut blandit aliquam, ligula diam posuere lorem, sed malesuada quam massa eu elit. S</span>
<span style="color:#898887">uspendisse ultrices velit nec mauris laoreet, eget tristique tortor maximus.</span>
<span style="color:#ff5500">*** Settings ***</span>
<span style="color:#644a9b;font-weight:bold">Documentation</span><span style="color:#898887"> Simple example demonstrating syntax highlighting.</span>
<span style="color:#898887">... Multiple lines.</span>
<span style="color:#898887">... Thanks to https://spage.fi/highlight-robot !</span>
<span style="color:#644a9b;font-weight:bold">Library </span>ExampleLibrary
<span style="color:#644a9b;font-weight:bold">Test Setup </span>Test Setup Keyword argument argument with <span style="color:#0057ae">${VARIABLE}</span>
<span style="color:#644a9b;font-weight:bold">Test Teardown </span>Test Keyword Teardown argument argument with <span style="color:#0057ae">${VARIABLE}</span>
<span style="color:#644a9b;font-weight:bold">Suite Setup </span>Big Suite Setup <span style="color:#0057ae">${ARG}</span> argument with <span style="color:#0057ae">${VARIABLE}</span>
<span style="color:#644a9b;font-weight:bold">Suite Teardown </span>Teardown keyword argument argument with <span style="color:#0057ae">${VARIABLE}</span>
<span style="color:#898887"># Comment in here too</span>
<span style="color:#644a9b;font-weight:bold">Resource </span><span style="color:#0057ae">${RESOURCES}</span>/file<span style="color:#ca60ca">.</span>txt
<span style="color:#644a9b;font-weight:bold">Variables </span><span style="color:#0057ae">${VARIABLES}</span>/file<span style="color:#ca60ca">.</span>txt
<span style="color:#ff5500">*** Variables ***</span>
<span style="color:#0057ae">${VARIABLE}</span> Variable value
<span style="color:#0057ae">@{LIST}</span> List variable here
<span style="color:#0057ae">&amp;{DICT}</span> Key1<span style="color:#ca60ca">=</span>Value1 Key2<span style="color:#ca60ca">=</span>Value2
<span style="color:#ff5500">*** Test Cases ***</span>
<span style="color:#644a9b">First example</span>
<span style="color:#ca60ca"> [</span><span style="color:#644a9b;font-weight:bold">Documentation</span><span style="color:#ca60ca">]</span><span style="color:#898887"> Most amazing</span>
<span style="color:#898887"> ... documentation</span>
Initialize System
Do Something
<span style="color:#898887"># Comment</span>
Result Should Be <span style="color:#0057ae">${42}</span>
Test if something and else something
A cool suite keyword that takes a string
<span style="color:#ca60ca"> [</span><span style="color:#644a9b;font-weight:bold">Teardown</span><span style="color:#ca60ca">]</span> Cleanup System <span style="color:#898887"># Being a good citizen</span>
<span style="color:#644a9b">Test if something and else something</span>
<span style="color:#ca60ca"> [</span><span style="color:#644a9b;font-weight:bold">Documentation</span><span style="color:#ca60ca">]</span><span style="color:#898887"> Do not change colors in middle of kw/tc name</span>
<span style="color:#ca60ca">[</span><span style="color:#644a9b;font-weight:bold">Setup</span><span style="color:#ca60ca">] </span><span style="color:#bf0303"> Small Keyword Setup</span>
Kw for if something and else something
Do a thing <span style="color:#0057ae">${thing}</span>
Run a for loop
Run a while loop to end
<span style="color:#898887">#A comment</span>
Kw for if something and else something
<span style="color:#0057ae">${status}</span> <span style="color:#ca60ca">=</span> BuiltIn<span style="color:#ca60ca">.</span>Evaluate 0 &lt; <span style="color:#0057ae">${result}</span> &lt; 10
Then print <span style="color:#0057ae">${status}</span>
<span style="color:#644a9b">Second </span><span style="color:#0057ae">${variable}</span><span style="color:#644a9b"> example</span>
<span style="color:#ca60ca"> [</span><span style="color:#644a9b;font-weight:bold">Documentation</span><span style="color:#ca60ca">]</span><span style="color:#898887"> Oneliner</span>
<span style="color:#ca60ca">[</span><span style="color:#644a9b;font-weight:bold">Template</span><span style="color:#ca60ca">] </span><span style="color:#bf0303"> Keyword</span>
<span style="color:#ca60ca">[</span><span style="color:#644a9b;font-weight:bold">Tags</span><span style="color:#ca60ca">] </span><span style="color:#bf0303"> aaa bbb ccc</span>
argument1 argument2
argument <span style="color:#0057ae">${VARIABLE}</span>
<span style="color:#0057ae">@{LIST}</span>
<span style="color:#644a9b">Three </span><span style="color:#0057ae">${var}</span><span style="color:#644a9b"> example </span><span style="color:#0057ae">${var2}</span><span style="color:#644a9b"> last </span><span style="color:#0057ae">${var3}</span>
<span style="color:#ca60ca"> [</span><span style="color:#644a9b;font-weight:bold">Documentation</span><span style="color:#ca60ca">]</span><span style="color:#898887"> Oneliner</span>
<span style="color:#ca60ca">[</span><span style="color:#644a9b;font-weight:bold">Tags</span><span style="color:#ca60ca">] </span><span style="color:#bf0303"> tag1 tag2</span>
<span style="color:#bf0303"> ... more tags</span>
Given system is initialized
When something is done
<span style="color:#898887"># Comment</span>
<span style="color:#898887"># Another Comment</span>
<span style="color:#898887"># Oops this comment is here</span>
<span style="color:#898887"># This comment is way over here!</span>
And things are ok
Then result should be <span style="color:#bf0303">"42"</span> but not <span style="color:#0057ae">${var1}</span> <span style="color:#898887">#Anything inside "" should be a string</span>
Another result should be <span style="color:#bf0303">'23'</span> <span style="color:#898887">#also for ''</span>
<span style="color:#ff5500">*** Keywords ***</span>
<span style="font-weight:bold">Result Should Be</span>
<span style="color:#ca60ca"> [</span><span style="color:#644a9b;font-weight:bold">Arguments</span><span style="color:#ca60ca">]</span> <span style="color:#0057ae">${expected}</span>
<span style="color:#0057ae">${actual}</span> <span style="color:#ca60ca">=</span> Get Value
Should be Equal <span style="color:#0057ae">${actual}</span> <span style="color:#0057ae">${expected}</span>
<span style="font-weight:bold">Then result should be </span><span style="color:#0057ae">${expected}</span>
Result Should Be <span style="color:#0057ae">${expected}</span>
this is also a <span style="color:#0057ae">$variable</span>
<span style="font-weight:bold">IF</span> <span style="color:#0057ae">$var_in_py_expr1</span> <span style="color:#ca60ca">==</span> <span style="color:#0057ae">$var_in_py_expr2</span>
Call Keyword
<span style="font-weight:bold">ELSE</span>
<span style="color:#898887">#nothing!!</span>
Do nothing
<span style="font-weight:bold">END</span>
<span style="font-weight:bold">Kw for if something and else something</span>
<span style="font-weight:bold">WHILE</span> <span style="color:#0057ae">${var}</span> <span style="color:#ca60ca">=</span> <span style="color:#0057ae">${True}</span>
<span style="font-weight:bold">IF</span> <span style="color:#0057ae">$var_in_py_expr1</span> <span style="color:#ca60ca">==</span> <span style="color:#0057ae">$var_in_py_expr2</span>
Call Keyword
<span style="font-weight:bold">ELSE</span>
<span style="color:#898887">#nothing!!</span>
Do nothing
<span style="font-weight:bold">END</span>
<span style="font-weight:bold">END</span>
<span style="font-weight:bold">Log items</span>
<span style="color:#ca60ca"> [</span><span style="color:#644a9b;font-weight:bold">Arguments</span><span style="color:#ca60ca">]</span> <span style="color:#0057ae">@{items}</span> <span style="color:#0057ae">${log_values}</span><span style="color:#ca60ca">=</span>True
<span style="font-weight:bold">IF</span> not <span style="color:#0057ae">${items}</span>
Log to console No items<span style="color:#ca60ca">.</span>
<span style="font-weight:bold">ELSE</span> <span style="font-weight:bold">IF</span> len<span style="color:#ca60ca">(</span><span style="color:#0057ae">${items}</span><span style="color:#ca60ca">)</span> <span style="color:#ca60ca">==</span> 1
<span style="font-weight:bold">IF</span> <span style="color:#0057ae">${log_values}</span>
Log to console One item: <span style="color:#0057ae">${items}</span><span style="color:#ca60ca">[</span>0<span style="color:#ca60ca">]</span>
<span style="font-weight:bold">ELSE</span>
Log to console One item<span style="color:#ca60ca">.</span>
<span style="font-weight:bold">END</span>
<span style="font-weight:bold">ELSE</span>
Log to console <span style="color:#0057ae">${</span>{len<span style="color:#ca60ca">(</span><span style="color:#0057ae">${items}</span><span style="color:#ca60ca">)</span>}} items<span style="color:#ca60ca">.</span>
<span style="font-weight:bold">IF</span> <span style="color:#0057ae">${log_values}</span>
<span style="font-weight:bold">FOR</span> <span style="color:#0057ae">${index}</span> <span style="color:#0057ae">${item}</span> <span style="font-weight:bold">IN</span> <span style="font-weight:bold">ENUMERATE</span> <span style="color:#0057ae">@{items}</span> start<span style="color:#ca60ca">=</span>1
Log to console Item <span style="color:#0057ae">${index}</span>: <span style="color:#0057ae">${item}</span>
<span style="font-weight:bold">END</span>
<span style="font-weight:bold">END</span>
<span style="font-weight:bold">END</span>
<span style="color:#ff5500">*** Tasks ***</span>
<span style="color:#0095ff;font-weight:bold">Process invoice</span>
Read information from PDF
Validate information <span style="color:#bf0303">"asd"</span>
Submit information to backend system
Validate information is visible in web UI
</pre></body></html>