Last change
on this file was
15441,
checked in by Mark Evenson, 4 years ago
|
Able to load from directories with whitespace
|
File size:
823 bytes
|
Line | |
---|
1 | package org.armedbear.lisp; |
---|
2 | |
---|
3 | import java.util.List; |
---|
4 | import java.text.MessageFormat; |
---|
5 | import org.junit.After; |
---|
6 | import org.junit.AfterClass; |
---|
7 | import org.junit.Before; |
---|
8 | import org.junit.BeforeClass; |
---|
9 | import org.junit.Test; |
---|
10 | import static org.junit.Assert.*; |
---|
11 | |
---|
12 | public class URLPathnameTest { |
---|
13 | |
---|
14 | |
---|
15 | @Test |
---|
16 | public void roundTrips() { |
---|
17 | String namestrings[] = { |
---|
18 | "https://www.youtube.com/user/BlackHatOfficialYT", |
---|
19 | "file:///a%20path%20/with/whitespace.lisp" |
---|
20 | }; |
---|
21 | |
---|
22 | for (String namestring : namestrings) { |
---|
23 | URLPathname result = URLPathname.create(namestring); |
---|
24 | String resultingNamestring = result.getNamestring(); |
---|
25 | String message = MessageFormat.format("Namestring \"{0}\" failed to roundtrip", namestring); |
---|
26 | assertTrue(message, |
---|
27 | namestring.equals(resultingNamestring)); |
---|
28 | } |
---|
29 | } |
---|
30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.