From 4bff60775898976686ed0252f62968e982b34b94 Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Sat, 1 May 2021 00:46:27 -0400 Subject: [PATCH] add tests for rust let statements --- test/highlight/rust/let/cmd | 1 + test/highlight/rust/let/in | 4 ++++ test/highlight/rust/let/rc | 3 +++ test/highlight/rust/let/script | 7 +++++++ 4 files changed, 15 insertions(+) create mode 100644 test/highlight/rust/let/cmd create mode 100644 test/highlight/rust/let/in create mode 100644 test/highlight/rust/let/rc create mode 100644 test/highlight/rust/let/script diff --git a/test/highlight/rust/let/cmd b/test/highlight/rust/let/cmd new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/test/highlight/rust/let/cmd @@ -0,0 +1 @@ + diff --git a/test/highlight/rust/let/in b/test/highlight/rust/let/in new file mode 100644 index 00000000..ec2f2738 --- /dev/null +++ b/test/highlight/rust/let/in @@ -0,0 +1,4 @@ +let foo = "bar"; +let mut foo = "bar"; +let (foo, bar) = ("baz", "quux"); +let (mut foo, mut bar) = ("baz", "quux"); diff --git a/test/highlight/rust/let/rc b/test/highlight/rust/let/rc new file mode 100644 index 00000000..64064c25 --- /dev/null +++ b/test/highlight/rust/let/rc @@ -0,0 +1,3 @@ +source "%val{runtime}/colors/default.kak" +source "%val{runtime}/rc/filetype/rust.kak" +set buffer filetype rust diff --git a/test/highlight/rust/let/script b/test/highlight/rust/let/script new file mode 100644 index 00000000..c5979336 --- /dev/null +++ b/test/highlight/rust/let/script @@ -0,0 +1,7 @@ +ui_out '{ "jsonrpc": "2.0", "method": "set_ui_options", "params": [{}] }' +ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "attributes": ["final_fg","final_bg"] }, "contents": "l" }, { "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "et" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " foo " }, { "face": { "fg": "yellow", "bg": "default", "attributes": [] }, "contents": "=" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "\"bar\"" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": ";\u000a" }], [{ "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "let" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "yellow", "bg": "default", "attributes": [] }, "contents": "mut" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " foo " }, { "face": { "fg": "yellow", "bg": "default", "attributes": [] }, "contents": "=" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "\"bar\"" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": ";\u000a" }], [{ "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "let" }, { "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "(foo, bar) " }, { "face": { "fg": "yellow", "bg": "default", "attributes": [] }, "contents": "=" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " (" }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "\"baz\"" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": ", " }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "\"quux\"" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": ");\u000a" }], [{ "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "let" }, { "face": { "fg": "cyan", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "(" }, { "face": { "fg": "yellow", "bg": "default", "attributes": [] }, "contents": "mut" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " foo, " }, { "face": { "fg": "yellow", "bg": "default", "attributes": [] }, "contents": "mut" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " bar) " }, { "face": { "fg": "yellow", "bg": "default", "attributes": [] }, "contents": "=" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " (" }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "\"baz\"" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": ", " }, { "face": { "fg": "magenta", "bg": "default", "attributes": [] }, "contents": "\"quux\"" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": ");\u000a" }]], { "fg": "default", "bg": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "attributes": [] }] }' +ui_out '{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] }' +ui_out '{ "jsonrpc": "2.0", "method": "info_hide", "params": [] }' +ui_out '{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "out 1:1 " }, { "face": { "fg": "black", "bg": "yellow", "attributes": [] }, "contents": "" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "1 sel" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " - client0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "attributes": [] }] }' +ui_out '{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 0, "column": 0 }] }' +ui_out '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'