mirror of
https://github.com/windwp/nvim-ts-autotag.git
synced 2025-01-01 13:59:13 -06:00
add option to run 1 test case
This commit is contained in:
parent
36f1422bfe
commit
5244e629d3
@ -1,3 +1,8 @@
|
||||
|
||||
if not _G.test_close then
|
||||
return
|
||||
end
|
||||
|
||||
local ts = require 'nvim-treesitter.configs'
|
||||
local helpers = {}
|
||||
ts.setup {
|
||||
@ -172,8 +177,6 @@ for _, value in pairs(data) do
|
||||
end
|
||||
end
|
||||
if #run_data == 0 then run_data = data end
|
||||
local autotag = require('nvim-ts-autotag')
|
||||
autotag.enableRename = false
|
||||
|
||||
local _, ts_utils = pcall(require, 'nvim-treesitter.ts_utils')
|
||||
_G.TU=ts_utils
|
||||
|
@ -22,8 +22,9 @@ lua << EOF
|
||||
|
||||
local _, ts_utils = pcall(require, 'nvim-treesitter.ts_utils')
|
||||
_G.T=ts_utils
|
||||
_G.test_rename = true
|
||||
_G.test_close = true
|
||||
require("plenary/busted")
|
||||
require("nvim-ts-autotag").setup()
|
||||
|
||||
EOF
|
||||
|
||||
|
@ -1,4 +1,9 @@
|
||||
local ts = require 'nvim-treesitter.configs'
|
||||
|
||||
if not _G.test_rename then
|
||||
return
|
||||
end
|
||||
|
||||
local helpers = {}
|
||||
ts.setup {
|
||||
ensure_installed = 'maintained',
|
||||
@ -68,6 +73,19 @@ local data = {
|
||||
},
|
||||
after = [[<lala class="lla" ]]
|
||||
},
|
||||
-- {
|
||||
-- only=true,
|
||||
-- name = "html not rename close tag if it have parent node map with child nod" ,
|
||||
-- filepath = './sample/index.html',
|
||||
-- filetype = "html",
|
||||
-- linenr = 12,
|
||||
-- key = [[ciwlala]],
|
||||
-- before = {
|
||||
-- [[<d|iv> </div>]],
|
||||
-- [[<div> </div>"]]
|
||||
-- },
|
||||
-- after = [[<d|iv> </div>]]
|
||||
-- },
|
||||
{
|
||||
name = "html not rename close tag with not valid" ,
|
||||
filepath = './sample/index.html',
|
||||
|
Loading…
Reference in New Issue
Block a user