Skip to content

Commit da003f2

Browse files
authored
fix: escape interpunct in display-name serialization (#32)
* fix: escape interpunkt in display-name serialization * bump nvim version
1 parent 0cd690a commit da003f2

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
matrix:
2828
os: [ubuntu-latest, macos-latest, windows-latest]
29-
neovim_version: ["v0.10.0"]
29+
neovim_version: ["v0.11.0"]
3030
include:
3131
- os: ubuntu-latest
3232
neovim_version: "nightly"

lua/neotest-vstest/mtp/init.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,20 @@ function Client:discover_tests()
5454
return self.test_cases
5555
end
5656

57+
local function sanitize_node(node)
58+
node["display-name"] = node["display-name"]
59+
and string.gsub(node["display-name"], "·", "\\u{00B7}")
60+
return node
61+
end
62+
5763
---@async
5864
---@param ids string[] list of test ids to run
5965
---@return neotest-vstest.Client.RunResult
6066
function Client:run_tests(ids)
6167
local nodes = {}
6268
for _, node in ipairs(self.test_nodes) do
6369
if vim.tbl_contains(ids, node.uid) then
64-
nodes[#nodes + 1] = node
70+
nodes[#nodes + 1] = sanitize_node(node)
6571
end
6672
end
6773
return mtp_client.run_tests(self.project.dll_file, nodes)
@@ -74,7 +80,7 @@ function Client:debug_tests(ids)
7480
local nodes = {}
7581
for _, node in ipairs(self.test_nodes) do
7682
if vim.tbl_contains(ids, node.uid) then
77-
nodes[#nodes + 1] = node
83+
nodes[#nodes + 1] = sanitize_node(node)
7884
end
7985
end
8086
return mtp_client.debug_tests(self.project.dll_file, nodes)

0 commit comments

Comments
 (0)