From 5244e629d38ea0beda4805a3b08bbbe5e8ed6bf5 Mon Sep 17 00:00:00 2001 From: windwp Date: Sun, 14 Mar 2021 18:16:50 +0700 Subject: [PATCH] add option to run 1 test case --- tests/closetag_spec.lua | 7 +++++-- tests/minimal.vim | 3 ++- tests/renametag_spec.lua | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/tests/closetag_spec.lua b/tests/closetag_spec.lua index 0aaa933..1a2637b 100644 --- a/tests/closetag_spec.lua +++ b/tests/closetag_spec.lua @@ -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 diff --git a/tests/minimal.vim b/tests/minimal.vim index 390fcbf..a759fc6 100644 --- a/tests/minimal.vim +++ b/tests/minimal.vim @@ -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 diff --git a/tests/renametag_spec.lua b/tests/renametag_spec.lua index 3fff427..f2d764d 100644 --- a/tests/renametag_spec.lua +++ b/tests/renametag_spec.lua @@ -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 = [[ ]], +-- [[
"]] +-- }, +-- after = [[ ]] +-- }, { name = "html not rename close tag with not valid" , filepath = './sample/index.html',