File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
- function URIParser. URI (p:: AbstractPath )
1
+ function URIParser. URI (p:: AbstractPath ; query = " " , fragment = " " )
2
2
if isempty (root (p))
3
3
throw (ArgumentError (" $p is not an absolute path" ))
4
4
end
@@ -16,5 +16,5 @@ function URIParser.URI(p::AbstractPath)
16
16
print (b, URIParser. escape (p. parts[i]))
17
17
end
18
18
19
- return URIParser. URI (String (take! (b)))
19
+ return URIParser. URI (URIParser . URI ( String (take! (b))); query = query, fragment = fragment )
20
20
end
Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ using FilePaths
6
6
@test string (URI (p " /foo foo/bar" )) == " file:///foo%20foo/bar"
7
7
@test_throws ArgumentError URI (p " foo/bar" )
8
8
@test string (URI (WindowsPath (" C:\\ foo\\ bar" ))) == " file:///C:/foo/bar"
9
+ @test string (URI (p " /foo/bar" , query= " querypart" , fragment= " fragmentpart" )) == " file:///foo/bar?querypart#fragmentpart"
9
10
end
You can’t perform that action at this time.
0 commit comments