Skip to content

Commit cc07677

Browse files
committed
Preserves paths when using shlex
1 parent 115cff0 commit cc07677

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/setup_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def run_request(request, fortls_args: list[str] = None):
2929
if fortls_args:
3030
# Input args might not be sanitised, fix that
3131
for i in fortls_args:
32-
command.extend(shlex.split(i))
32+
command.extend(shlex.split(i, posix=False))
3333

3434
pid = subprocess.Popen(
3535
command,

test/test_preproc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def check_return(result_array, checks):
3535
string += hover_req(file_path, 9, 7) # multiline function with if conditional
3636
file_path = root_dir / "preproc_keywords.F90"
3737
string += hover_req(file_path, 6, 2) # ignores PP across Fortran line continuations
38-
errcode, results = run_request(string, [f'--config={root_dir/".pp_conf.json"}'])
38+
config = str(root_dir / ".pp_conf.json")
39+
errcode, results = run_request(string, ["--config", config])
3940
assert errcode == 0
4041

4142
# Reference solution

0 commit comments

Comments
 (0)