|
262 | 262 | res = relpath(filep, startp) |
263 | 263 | idx += 1 |
264 | 264 | @test res == relpath_expected_results[idx] |
| 265 | + if Sys.iswindows() |
| 266 | + @test relpath("e:$filep", "e:$startp") == relpath_expected_results[idx] |
| 267 | + @test relpath("e:$filep", "E:$startp") == relpath_expected_results[idx] |
| 268 | + @test relpath("E:$filep", "e:$startp") == relpath_expected_results[idx] |
| 269 | + @test relpath("E:$filep", "E:$startp") == relpath_expected_results[idx] |
| 270 | + end |
265 | 271 | end |
266 | 272 | end |
267 | 273 | # Additional cases |
|
271 | 277 | test_relpath() |
272 | 278 | end |
273 | 279 |
|
| 280 | + if Sys.iswindows() |
| 281 | + @testset "issue #23646" begin |
| 282 | + @test lowercase(relpath("E:\\a\\b", "C:\\c")) == "e:\\a\\b" |
| 283 | + @test lowercase(relpath("E:\\a\\b", "c:\\c")) == "e:\\a\\b" |
| 284 | + @test lowercase(relpath("e:\\a\\b", "C:\\c")) == "e:\\a\\b" |
| 285 | + @test lowercase(relpath("e:\\a\\b", "c:\\c")) == "e:\\a\\b" |
| 286 | + |
| 287 | + @test relpath("C:\\a\\b", "c:\\a\\b") == "." |
| 288 | + @test relpath("c:\\a\\b", "C:\\a\\b") == "." |
| 289 | + @test lowercase(relpath("C:\\a\\b", "c:\\c\\d")) == "..\\..\\a\\b" |
| 290 | + @test lowercase(relpath("c:\\a\\b", "C:\\c\\d")) == "..\\..\\a\\b" |
| 291 | + end |
| 292 | + end |
| 293 | + |
274 | 294 | @testset "type stability" begin |
275 | 295 | @test isa(joinpath(S("a"), S("b")), String) |
276 | 296 | @test isa(joinpath(S(abspath("a")), S("b")), String) |
|
0 commit comments