source: trunk/abcl/test/src/org/armedbear/lisp/URLPathnameTest.java

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 
1package org.armedbear.lisp;
2
3import java.util.List;
4import java.text.MessageFormat;
5import org.junit.After;
6import org.junit.AfterClass;
7import org.junit.Before;
8import org.junit.BeforeClass;
9import org.junit.Test;
10import static org.junit.Assert.*;
11
12public 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.