forked from fwcd/kotlin-language-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathURIsTest.kt
More file actions
31 lines (26 loc) · 696 Bytes
/
Copy pathURIsTest.kt
File metadata and controls
31 lines (26 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package org.javacs.kt
import org.junit.Assert.assertEquals
import org.javacs.kt.util.parseURI
import org.junit.Test
import java.net.URI
class URIsTest {
@Test
fun `parseURI should work with different paths`() {
assertEquals(
URI.create("/home/ws%201"),
parseURI("/home/ws 1")
)
assertEquals(
URI.create("/home/ws-1"),
parseURI("/home/ws-1")
)
assertEquals(
URI.create("file:/home/ws%201"),
parseURI("file:///home/ws%201")
)
assertEquals(
URI.create("file:/home/ws%201"),
parseURI("file%3A%2F%2F%2Fhome%2Fws%201")
)
}
}