add tests for rust let statements

This commit is contained in:
Skyler Hawthorne 2021-05-01 00:46:27 -04:00
parent a25ef2bd6d
commit 4bff607758
4 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1 @@

View File

@ -0,0 +1,4 @@
let foo = "bar";
let mut foo = "bar";
let (foo, bar) = ("baz", "quux");
let (mut foo, mut bar) = ("baz", "quux");

View File

@ -0,0 +1,3 @@
source "%val{runtime}/colors/default.kak"
source "%val{runtime}/rc/filetype/rust.kak"
set buffer filetype rust

View File

@ -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] }'