mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
10.30.2007 7b09f76c7501f692657385025ccb10be5d974c7a
opends/tests/unit-tests-testng/src/server/org/opends/server/tools/LDIFDiffTestCase.java
@@ -86,13 +86,13 @@
  public void testUsage()
  {
    String[] args = { "--help" };
    assertEquals(LDIFDiff.mainDiff(args, true), 0);
    assertEquals(LDIFDiff.mainDiff(args, true, System.out, System.err), 0);
    args = new String[] { "-H" };
    assertEquals(LDIFDiff.mainDiff(args, true), 0);
    assertEquals(LDIFDiff.mainDiff(args, true, System.out, System.err), 0);
    args = new String[] { "-?" };
    assertEquals(LDIFDiff.mainDiff(args, true), 0);
    assertEquals(LDIFDiff.mainDiff(args, true, System.out, System.err), 0);
  }
@@ -108,7 +108,7 @@
      "--invalid"
    };
    assertFalse(LDIFDiff.mainDiff(args, true) == 0);
    assertFalse(LDIFDiff.mainDiff(args, true, System.out, System.err) == 0);
  }
@@ -279,12 +279,12 @@
    if (normalDiffFile == null)
    {
      // We expect this to fail, so just make sure that it does.
      assertFalse(LDIFDiff.mainDiff(args, true) == 0);
      assertFalse(LDIFDiff.mainDiff(args, true, System.out, System.err) == 0);
      outputFile.delete();
      return;
    }
    assertEquals(LDIFDiff.mainDiff(args, true), 0);
    assertEquals(LDIFDiff.mainDiff(args, true, System.out, System.err), 0);
    long outputChecksum = 0L;
    BufferedReader reader = new BufferedReader(new FileReader(outputFile));
@@ -358,12 +358,12 @@
    if (singleValueDiffFile == null)
    {
      // We expect this to fail, so just make sure that it does.
      assertFalse(LDIFDiff.mainDiff(args, true) == 0);
      assertFalse(LDIFDiff.mainDiff(args, true, System.out, System.err) == 0);
      outputFile.delete();
      return;
    }
    assertEquals(LDIFDiff.mainDiff(args, true), 0);
    assertEquals(LDIFDiff.mainDiff(args, true, System.out, System.err), 0);
    long outputChecksum = 0L;
    BufferedReader reader = new BufferedReader(new FileReader(outputFile));
@@ -438,7 +438,7 @@
      "-o", diffOutputFile.getAbsolutePath()
    };
    assertEquals(LDIFDiff.mainDiff(args, true), 0);
    assertEquals(LDIFDiff.mainDiff(args, true, System.out, System.err), 0);
    // Use LDIFModify to generate a new target file.
@@ -453,7 +453,8 @@
      "-t", newTargetFile.getAbsolutePath()
    };
    assertEquals(LDIFModify.ldifModifyMain(args, true), 0);
    assertEquals(LDIFModify.ldifModifyMain(args, true, System.out, System.err),
                 0);
    // Use LDIFDiff again to verify that there are effectively no differences
@@ -468,7 +469,7 @@
      "-o", newDiffFile.getAbsolutePath()
    };
    assertEquals(LDIFDiff.mainDiff(args, true), 0);
    assertEquals(LDIFDiff.mainDiff(args, true, System.out, System.err), 0);
    // Read the contents of the new diff file and make sure it matches the
@@ -549,7 +550,7 @@
      "-S"
    };
    assertEquals(LDIFDiff.mainDiff(args, true), 0);
    assertEquals(LDIFDiff.mainDiff(args, true, System.out, System.err), 0);
    // Use LDIFModify to generate a new target file.
@@ -564,7 +565,8 @@
      "-t", newTargetFile.getAbsolutePath()
    };
    assertEquals(LDIFModify.ldifModifyMain(args, true), 0);
    assertEquals(LDIFModify.ldifModifyMain(args, true, System.out, System.err),
                 0);
    // Use LDIFDiff again to verify that there are effectively no differences
@@ -579,7 +581,7 @@
      "-o", newDiffFile.getAbsolutePath()
    };
    assertEquals(LDIFDiff.mainDiff(args, true), 0);
    assertEquals(LDIFDiff.mainDiff(args, true, System.out, System.err), 0);
    // Read the contents of the new diff file and make sure it matches the