@@ -1194,7 +1194,7 @@ let current_dir, forbidden
11941194 catch e
11951195 e isa Base. IOError && occursin (" ELOOP" , e. msg)
11961196 end
1197- c, r = test_complete (" \" " * escape_string (joinpath ( path, " selfsym " )) )
1197+ c, r = test_complete (" \" $( escape_string (path)) /selfsym " )
11981198 @test c == [" selfsymlink" ]
11991199 end
12001200 end
@@ -1244,7 +1244,7 @@ mktempdir() do path
12441244
12451245 # For normal strings the string should be properly escaped according to
12461246 # the usual rules for Julia strings.
1247- s = " cd(\" " * julia_esc (joinpath (path, space_folder, " space" ) )
1247+ s = " cd(\" " * julia_esc (joinpath (path, space_folder) * " / space" )
12481248 c, r = test_complete (s)
12491249 @test s[r] == " space"
12501250 @test " space .file\" " in c
@@ -1253,7 +1253,7 @@ mktempdir() do path
12531253 # which needs to be escaped in Julia strings (on unix we could do this
12541254 # test with all sorts of special chars)
12551255 touch (joinpath (space_folder, " needs_escape\$ .file" ))
1256- escpath = julia_esc (joinpath (path, space_folder, " needs_escape\$ " ) )
1256+ escpath = julia_esc (joinpath (path, space_folder) * " / needs_escape\$ " )
12571257 s = " cd(\" $escpath "
12581258 c, r = test_complete (s)
12591259 @test s[r] == " needs_escape\\\$ "
@@ -1290,7 +1290,7 @@ mktempdir() do path
12901290 # in shell commands the shell path completion cannot complete
12911291 # paths with these characters
12921292 c, r, res = test_scomplete (test_dir)
1293- @test c[1 ] == ' \' ' * test_dir* (Sys. iswindows () ? " \\\\ " : " /" )* ' \' '
1293+ @test c[1 ] == ' \' ' * test_dir* (Sys. iswindows () ? " \\ " : " /" )* ' \' '
12941294 @test res
12951295 end
12961296 escdir = julia_esc (test_dir)
@@ -1331,8 +1331,13 @@ if Sys.iswindows()
13311331 cd (path) do
13321332 s = " cd ..\\\\ "
13331333 c,r = test_scomplete (s)
1334+ @test r == lastindex (s)- 3 : lastindex (s)
1335+ @test " ../'$temp_name \\ '" in c
1336+
1337+ s = " cd ../"
1338+ c,r = test_scomplete (s)
13341339 @test r == lastindex (s)+ 1 : lastindex (s)
1335- @test temp_name * " \\\\ " in c
1340+ @test " ' $temp_name \\ ' " in c
13361341
13371342 s = " ls $(file[1 : 2 ]) "
13381343 c,r = test_scomplete (s)
@@ -1342,7 +1347,12 @@ if Sys.iswindows()
13421347 s = " cd(\" ..\\\\ "
13431348 c,r = test_complete (s)
13441349 @test r == lastindex (s)+ 1 : lastindex (s)
1345- @test temp_name * " \\\\ " in c
1350+ @test " ../$temp_name \\\\ " in c
1351+
1352+ s = " cd(\" ../"
1353+ c,r = test_complete (s)
1354+ @test r == lastindex (s)- 3 : lastindex (s)
1355+ @test " $temp_name \\\\ " in c
13461356
13471357 s = " cd(\" $(file[1 : 2 ]) "
13481358 c,r = test_complete (s)
0 commit comments