Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Don't attempt fancy encoding tests if file.encoding is substandard
This resolves test breakage that is not easily fixed by other means.
  • Loading branch information
argggh committed Jun 13, 2016
commit d5d85cb08dc799e621802cb70169ebb8e752496b
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import com.google.common.base.Joiner;

import static org.junit.Assert.*;
import static org.junit.Assume.*;

@RunWith(JUnit4.class)
public class EmJarClassLoaderTest extends EmJarTest
Expand Down Expand Up @@ -100,6 +101,7 @@ private static InputStream getResourceAsStreamRobust(
public void testClassPathQuoting()
throws Exception
{
assumeTrue("UTF-8".equals(System.getProperty("file.encoding")));
final EmJarClassLoader loader = testLoader();
final String searchName = "entry-" + WEIRD + ".txt";
final InputStream is = getResourceAsStreamRobust(loader, searchName);
Expand Down
2 changes: 2 additions & 0 deletions emjar/src/test/java/com/comoyo/emjar/JarTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.junit.runners.JUnit4;

import static org.junit.Assert.*;
import static org.junit.Assume.*;

@RunWith(JUnit4.class)
public abstract class JarTest extends EmJarTest
Expand Down Expand Up @@ -75,6 +76,7 @@ public void testAllBundles()
public void testQuoting()
throws Exception
{
assumeTrue("UTF-8".equals(System.getProperty("file.encoding")));
testJarBundle(WEIRD);
}
}