From 508dda0e6c327a1430fbb0d9a382fe6a848c933e Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 18 Sep 2023 07:07:54 +0800 Subject: test(ui/fold_spec): more testing for clicking on 'foldcolumn' (#25225) --- test/functional/ui/fold_spec.lua | 74 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) (limited to 'test') diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index a371b45e2b..c8ca5be282 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -424,8 +424,82 @@ describe("folded lines", function() ]]) end + if multigrid then + meths.input_mouse('left', 'press', '', 2, 0, 0) + screen:expect([[ + ## grid 1 + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [3:---------------------------------------------]| + ## grid 2 + {7:▸ }{5:^+-- 6 lines: aa···························}| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + ## grid 3 + :set norightleft | + ]]) + else + meths.input_mouse('left', 'press', '', 0, 0, 0) + screen:expect([[ + {7:▸ }{5:^+-- 6 lines: aa···························}| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + :set norightleft | + ]]) + end + -- Add a winbar to avoid double-clicks command('setlocal winbar=!!!!!!') + if multigrid then + meths.input_mouse('left', 'press', '', 2, 1, 0) + screen:expect([[ + ## grid 1 + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [3:---------------------------------------------]| + ## grid 2 + {11:!!!!!! }| + {7:▾▸}{5:^+--- 5 lines: aa··························}| + {7:│ }ff | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + ## grid 3 + :set norightleft | + ]]) + else + meths.input_mouse('left', 'press', '', 0, 1, 0) + screen:expect([[ + {11:!!!!!! }| + {7:▾▸}{5:^+--- 5 lines: aa··························}| + {7:│ }ff | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + :set norightleft | + ]]) + end + if multigrid then meths.input_mouse('left', 'press', '', 2, 1, 1) screen:expect([[ -- cgit