diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:33:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:33:32 +0000 |
commit | 1f403ad2197fc7442409f434ee574f3e6b46fb73 (patch) | |
tree | 0299c6dd11d5edfa918a29b6456bc1875f1d288c /tests/snippets/tcl | |
parent | Initial commit. (diff) | |
download | pygments-1f403ad2197fc7442409f434ee574f3e6b46fb73.tar.xz pygments-1f403ad2197fc7442409f434ee574f3e6b46fb73.zip |
Adding upstream version 2.14.0+dfsg.upstream/2.14.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/snippets/tcl')
-rw-r--r-- | tests/snippets/tcl/test_comma_and_at.txt | 131 | ||||
-rw-r--r-- | tests/snippets/tcl/test_vars.txt | 17 |
2 files changed, 148 insertions, 0 deletions
diff --git a/tests/snippets/tcl/test_comma_and_at.txt b/tests/snippets/tcl/test_comma_and_at.txt new file mode 100644 index 0000000..51e1733 --- /dev/null +++ b/tests/snippets/tcl/test_comma_and_at.txt @@ -0,0 +1,131 @@ +---input--- +# Alt and arrow keys to scroll +set scroll_amount 2 +bind Text <Alt-Up> { + %W yview scroll -$scroll_amount units + %W mark set insert @0,[expr [winfo height %W] / 2] +} +bind Text <Alt-Down> { + %W yview scroll $scroll_amount units + %W mark set insert @0,[expr [winfo height %W] / 2] +} + +---tokens--- +'#' Comment +' Alt and arrow keys to scroll\n' Comment + +'set' Keyword +' ' Text.Whitespace +'scroll_amount' Text +' ' Text.Whitespace +'2' Literal.Number.Integer +'\n' Text + +'bind' Name.Variable +' ' Text.Whitespace +'Text' Text +' ' Text.Whitespace +'<' Operator +'Alt-Up' Text +'>' Operator +' ' Text.Whitespace +'{' Keyword +'\n ' Text.Whitespace +'%' Operator +'W' Name.Variable +' ' Text.Whitespace +'yview' Text +' ' Text.Whitespace +'scroll' Text +' ' Text.Whitespace +'-' Operator +'$scroll_amount' Name.Variable +' ' Text.Whitespace +'units' Text +'\n' Text + +' ' Text.Whitespace +'%' Operator +'W' Name.Variable +' ' Text.Whitespace +'mark' Text +' ' Text.Whitespace +'set' Text +' ' Text.Whitespace +'insert' Text +' ' Text.Whitespace +'@0,' Text +'[' Keyword +'expr' Keyword +' ' Text.Whitespace +'[' Keyword +'winfo' Name.Variable +' ' Text.Whitespace +'height' Text +' ' Text.Whitespace +'%' Operator +'W' Text +']' Keyword +' ' Text.Whitespace +'/' Operator +' ' Text.Whitespace +'2' Literal.Number.Integer +']' Keyword +'\n' Text + +'}' Keyword +'\n' Text + +'bind' Name.Variable +' ' Text.Whitespace +'Text' Text +' ' Text.Whitespace +'<' Operator +'Alt-Down' Text +'>' Operator +' ' Text.Whitespace +'{' Keyword +'\n ' Text.Whitespace +'%' Operator +'W' Name.Variable +' ' Text.Whitespace +'yview' Text +' ' Text.Whitespace +'scroll' Text +' ' Text.Whitespace +'$scroll_amount' Name.Variable +' ' Text.Whitespace +'units' Text +'\n' Text + +' ' Text.Whitespace +'%' Operator +'W' Name.Variable +' ' Text.Whitespace +'mark' Text +' ' Text.Whitespace +'set' Text +' ' Text.Whitespace +'insert' Text +' ' Text.Whitespace +'@0,' Text +'[' Keyword +'expr' Keyword +' ' Text.Whitespace +'[' Keyword +'winfo' Name.Variable +' ' Text.Whitespace +'height' Text +' ' Text.Whitespace +'%' Operator +'W' Text +']' Keyword +' ' Text.Whitespace +'/' Operator +' ' Text.Whitespace +'2' Literal.Number.Integer +']' Keyword +'\n' Text + +'}' Keyword +'\n' Text diff --git a/tests/snippets/tcl/test_vars.txt b/tests/snippets/tcl/test_vars.txt new file mode 100644 index 0000000..5c62390 --- /dev/null +++ b/tests/snippets/tcl/test_vars.txt @@ -0,0 +1,17 @@ +---input--- +set size 10; puts ${size}x${size} + +---tokens--- +'set' Keyword +' ' Text.Whitespace +'size' Text +' ' Text.Whitespace +'10' Literal.Number.Integer +';' Keyword +' ' Text.Whitespace +'puts' Name.Builtin +' ' Text.Whitespace +'${size}' Name.Variable +'x' Text +'${size}' Name.Variable +'\n' Text |