aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java
diff options
context:
space:
mode:
authorGravatar John Cater <jcater@google.com>2017-03-17 19:01:32 +0000
committerGravatar Yue Gan <yueg@google.com>2017-03-20 11:40:11 +0000
commit75795fa7f14339fd47390ed349e270d4c36988b7 (patch)
tree61e3140905b6deb19fc118a23a7ff2fc3639d177 /src/test/java
parent222b03cd7562e8c44f07e6decd900a4d52b4f95f (diff)
Fix PathPackageLocatorTest to do case-insensitive string checks.
-- PiperOrigin-RevId: 150467024 MOS_MIGRATED_REVID=150467024
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/pkgcache/PathPackageLocatorTest.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/PathPackageLocatorTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/PathPackageLocatorTest.java
index 47b696cdec..618dac8368 100644
--- a/src/test/java/com/google/devtools/build/lib/pkgcache/PathPackageLocatorTest.java
+++ b/src/test/java/com/google/devtools/build/lib/pkgcache/PathPackageLocatorTest.java
@@ -27,16 +27,15 @@ import com.google.devtools.build.lib.testutil.FoundationTestCase;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.UnixGlob;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
+import java.util.regex.Pattern;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Test package-path logic.
@@ -222,7 +221,12 @@ public class PathPackageLocatorTest extends FoundationTestCase {
locatorWithSymlinks.getPackageBuildFile(PackageIdentifier.createInMainRepo("C/D"));
fail();
} catch (BuildFileNotFoundException e) {
- assertThat(e).hasMessage("no such package 'C/D': BUILD file not found on package path");
+ String message = e.getMessage();
+ assertThat(message)
+ .containsMatch(
+ Pattern.compile(
+ "no such package 'C/D': BUILD file not found on package path",
+ Pattern.CASE_INSENSITIVE));
}
}