OPENDJ-777 (CR-1343) ldapcompare should exit with different values w.r.t comparison is successful or not
LDAPCompare.java:
In mainCompare(), added useCompareResultCode option and changed the code to return the aggregated resultCode when this option is used from command line, else return SUCCESS. Used LDAPResultCode everywhere possible.
In readAndExecute() and executeCompare(), changed result code to int.
Added aggregateResultCode() method.
LDAPCompareTestCase.java:
Replaced exit code 0 with LDAPResultCode.SUCCESS.
In many tests, added checks for --useCompareResultCode option.
Added testMultipleCompareAllTrue(), testMultipleCompareOneCompareIsFalse(), testMultipleCompareOneNoSuchObject(), addEntriesUpToParentDN(), getAggregateResultCodeParamsAndResults() and testAggregateResultCode().