summaryrefslogtreecommitdiff
path: root/src/test/java/bjc/replpair
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2019-06-12 21:48:59 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2019-06-12 21:48:59 -0400
commit6be017f0b44dae0b43a127d82c9e8d3bc6637bce (patch)
tree042f7ff591f27b9c0b4ed0fa661714f76be10094 /src/test/java/bjc/replpair
parent5392663881d49fed1df32c58c99f63242b38733f (diff)
Tests & Debugging
Added another test, this time for staging. Also added some debugging capabilities.
Diffstat (limited to 'src/test/java/bjc/replpair')
-rw-r--r--src/test/java/bjc/replpair/ReplPairTest.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/java/bjc/replpair/ReplPairTest.java b/src/test/java/bjc/replpair/ReplPairTest.java
index 4ce918f..ec7d8a5 100644
--- a/src/test/java/bjc/replpair/ReplPairTest.java
+++ b/src/test/java/bjc/replpair/ReplPairTest.java
@@ -16,7 +16,6 @@ import org.junit.Test;
* @author Ben Culkin
*/
public class ReplPairTest {
- // Test that we load empty files fine
@Test
public void testLoadFile() {
List<ReplPair> lrp = null;
@@ -51,6 +50,11 @@ public class ReplPairTest {
assertMultiReplace("data/test/test5.rp", "a", "a", "aa", "ab");
}
+ @Test
+ public void testStaging() {
+ assertMultiReplace(true, "data/test/test6.rp", "c", "a", "y2", "x");
+ }
+
private void assertMultiReplace(String fle, String... inps) {
assertMultiReplace(false, fle, inps);
}
@@ -89,6 +93,8 @@ public class ReplPairTest {
}
private void assertReplacesTo(boolean logRep, String right, List<ReplPair> rps, String inp) {
+ if (logRep) System.err.printf("\t[LOG] Checking '%s' -> '%s'\n", inp, right);
+
String tmp = inp;
for (ReplPair rp : rps) {