@@ -21,38 +21,39 @@ local T = new_set({
2121 },
2222})
2323
24+ local get_lines = function ()
25+ return child .api .nvim_buf_get_lines (0 , 0 , - 1 , true )
26+ end
2427
25- local get_lines = function () return child .api .nvim_buf_get_lines (0 , 0 , - 1 , true ) end
26-
27- T [' wrap_cursor' ] = MiniTest .new_set ({
28+ T [" wrap_cursor" ] = MiniTest .new_set ({
2829 hooks = {
2930 pre_case = function ()
3031 child .cmd (" e _not_existing_new_buffer.py" )
3132 child .type_keys (" cc" , [[ "TEST"]] , " <Esc>" , " 0" )
3233 end ,
33- }
34+ },
3435})
3536
36- T [' wrap_cursor' ][ ' normal' ] = function ()
37+ T [" wrap_cursor" ][ " normal" ] = function ()
3738 child .cmd (" Python treesitter wrap_cursor test(%s)" )
38- eq (get_lines (), {[[ test("TEST")]] })
39+ eq (get_lines (), { [[ test("TEST")]] })
3940end
4041
41- T [' wrap_cursor' ][ ' visual' ] = function ()
42+ T [" wrap_cursor" ][ " visual" ] = function ()
4243 child .type_keys (" l" , " v" , " $" )
4344 child .type_keys ([[ :Python treesitter wrap_cursor test(%s)<cr>]] )
44- eq (get_lines (), {[[ "test(TEST")]] })
45+ eq (get_lines (), { [[ "test(TEST")]] })
4546end
4647
47- T [' wrap_cursor' ][ ' visual_with_selection' ] = function ()
48+ T [" wrap_cursor" ][ " visual_with_selection" ] = function ()
4849 child .type_keys (" l" , " v" , " $" )
4950 child .type_keys ([[ :Python treesitter wrap_cursor<cr>1<cr>]] )
50- eq (get_lines (), {[[ "print(TEST")]] })
51+ eq (get_lines (), { [[ "print(TEST")]] })
5152end
5253
53- T [' wrap_cursor' ][ ' with_selection' ] = function ()
54+ T [" wrap_cursor" ][ " with_selection" ] = function ()
5455 child .type_keys ([[ :Python treesitter wrap_cursor<cr>1<cr>]] )
55- eq (get_lines (), {[[ print("TEST")]] })
56+ eq (get_lines (), { [[ print("TEST")]] })
5657end
5758
5859-- Return test set which will be collected and execute inside `MiniTest.run()`
0 commit comments