diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-01-20 20:48:42 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-01-20 20:48:42 +0100 |
commit | 20c5d3b2ef15833d6f01eefc5b2b2a89736c1538 (patch) | |
tree | 7e60a77809855b910419ae20dee824af19e3bada /testsuite | |
parent | 4f484625f9587d2f12a6e2f8ed9cac2fff467183 (diff) | |
download | ghdl-20c5d3b2ef15833d6f01eefc5b2b2a89736c1538.tar.gz ghdl-20c5d3b2ef15833d6f01eefc5b2b2a89736c1538.tar.bz2 ghdl-20c5d3b2ef15833d6f01eefc5b2b2a89736c1538.zip |
LanguageServer: quote URI, adjust lsp.py (for Windows)
URI on windows have the colon character (':') quoted.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/pyunit/lsp/LanguageServer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testsuite/pyunit/lsp/LanguageServer.py b/testsuite/pyunit/lsp/LanguageServer.py index 2ef378b9a..39d23184e 100644 --- a/testsuite/pyunit/lsp/LanguageServer.py +++ b/testsuite/pyunit/lsp/LanguageServer.py @@ -4,6 +4,7 @@ from sys import executable from io import BytesIO from json import load as json_load, loads as json_loads, dumps as json_dumps from pathlib import Path +from urllib.parse import quote from subprocess import run as subprocess_run, PIPE from typing import Optional from unittest import TestCase, skip @@ -69,7 +70,7 @@ def root_subst(obj, root): if k in ('rootUri', 'uri'): assert v.startswith("file://@ROOT@/") p = "file://" + ("/" if is_windows else "") - obj[k] = p + root + v[13:] + obj[k] = p + quote(root + v[13:]) elif k in ('rootPath', 'message'): obj[k] = v.replace('@ROOT@', root) else: |