Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
name-snrl committed Mar 19, 2024
1 parent c26ad7d commit 7425b35
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/nvim-autopairs_spec.lua
Expand Up @@ -8,6 +8,7 @@ local utils = require('nvim-autopairs.utils')
_G.npairs = npairs;

-- use only = true to test 1 case
-- stylua: ignore
local data = {
{
-- only = true,
Expand Down Expand Up @@ -808,6 +809,17 @@ local data = {
before = [[('|') ]],
after = [[(''|) ]]
},
{
setup_func = function()
npairs.add_rules({
Rule('123456', '789'):with_pair(cond.before_regex('^12345$', 5)),
})
end,
name = '87 test before_regex with a specific string length',
key = [[123456]],
before = [[ some text before| ]],
after = [[ some text before123456|789 ]],
},
}

local run_data = _G.Test_filter(data)
Expand Down

0 comments on commit 7425b35

Please sign in to comment.