Files
RedBear-OS/local/recipes/kde/kf6-syntaxhighlighting/source/autotests/folding/test.elv.fold
T

27 lines
1.4 KiB
Plaintext

# A sample file to test syntax highlighting.
nop "double \n quoted" and 'single '' quoted' # comment
# Various variable contexts
nop $pid
var var-name = <beginfold id='1'></beginfold id='1'>{ var fn-name~ = <beginfold id='1'></beginfold id='1'>{var not-var-name<endfold id='1'>}</endfold id='1'> <endfold id='1'>}</endfold id='1'>
nop (set var-name = foo | tmp var-name = bar); del var-name
for var-name [] <beginfold id='1'></beginfold id='1'>{ <endfold id='1'>}</endfold id='1'>
try <beginfold id='1'></beginfold id='1'>{ <endfold id='1'>}</endfold id='1'> catch var-name <beginfold id='1'></beginfold id='1'>{ <endfold id='1'>}</endfold id='1'>
# Builtin functions
!= a (nop b) | echo c
# Builtin special command
and a b # "operator"
use re # "other"
if a <beginfold id='1'></beginfold id='1'>{ <endfold id='1'>}</endfold id='1'> elif b <beginfold id='1'></beginfold id='1'>{ <endfold id='1'>}</endfold id='1'> else <beginfold id='1'></beginfold id='1'>{ <endfold id='1'>}</endfold id='1'>
try <beginfold id='1'></beginfold id='1'>{ <endfold id='1'>}</endfold id='1'> except err <beginfold id='1'></beginfold id='1'>{ <endfold id='1'>}</endfold id='1'> else <beginfold id='1'></beginfold id='1'>{ <endfold id='1'>}</endfold id='1'> finally <beginfold id='1'></beginfold id='1'>{ <endfold id='1'>}</endfold id='1'>
# Metacharacters
echo ** () []
# Regression tests
set-env # should highlight entire set-env
set-foo # should highlight nothing