aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent
diff options
context:
space:
mode:
authorPhạm Huy Hoàng <hoangtun0810@gmail.com>2024-02-13 23:00:53 +0700
committerChristian Clason <c.clason@uni-graz.at>2024-02-13 17:58:36 +0100
commit1c72e797ba7a07c465633751502604258dd87255 (patch)
treee32408208b8bc0b0ea2561e5372c3a41571054ed /tests/indent
parentfix(cpp): add back comment injection (diff)
downloadnvim-treesitter-1c72e797ba7a07c465633751502604258dd87255.tar
nvim-treesitter-1c72e797ba7a07c465633751502604258dd87255.tar.gz
nvim-treesitter-1c72e797ba7a07c465633751502604258dd87255.tar.bz2
nvim-treesitter-1c72e797ba7a07c465633751502604258dd87255.tar.lz
nvim-treesitter-1c72e797ba7a07c465633751502604258dd87255.tar.xz
nvim-treesitter-1c72e797ba7a07c465633751502604258dd87255.tar.zst
nvim-treesitter-1c72e797ba7a07c465633751502604258dd87255.zip
fix(yuck): comment out start-of-line parens
Diffstat (limited to 'tests/indent')
-rw-r--r--tests/indent/yuck/indent.yuck17
-rw-r--r--tests/indent/yuck_spec.lua19
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/indent/yuck/indent.yuck b/tests/indent/yuck/indent.yuck
new file mode 100644
index 000000000..c224548af
--- /dev/null
+++ b/tests/indent/yuck/indent.yuck
@@ -0,0 +1,17 @@
+(defwidget name
+ :widget parameter
+ (box one
+ :box1 parameter
+ (box two
+ :box2 parameter
+ )
+ )
+)
+
+(defwidget name
+ :widget parameter
+ (box one
+ )
+)
+
+(defwidget name
diff --git a/tests/indent/yuck_spec.lua b/tests/indent/yuck_spec.lua
new file mode 100644
index 000000000..6ce15de6f
--- /dev/null
+++ b/tests/indent/yuck_spec.lua
@@ -0,0 +1,19 @@
+local Runner = require("tests.indent.common").Runner
+local run = Runner:new(it, "tests/indent/yuck", {
+ tabstop = 2,
+ shiftwidth = 2,
+ expandtab = true,
+})
+
+describe("indent yuck", function()
+ describe("whole file:", function()
+ run:whole_file(".", {
+ expected_failures = {},
+ })
+ end)
+
+ describe("new line:", function()
+ run:new_line("indent.yuck", { on_line = 13, text = ":box1 parameter", indent = 4 })
+ run:new_line("indent.yuck", { on_line = 17, text = ")", indent = 0 })
+ end)
+end)