HDFS-8310. Fix TestCLI.testAll 'help: help for find' on Windows. (Kiran Kumar M R via Xiaoyu Yao)

This commit is contained in:
Xiaoyu Yao 2015-05-06 10:24:46 -07:00
parent a583a40693
commit 7a26d174af
2 changed files with 8 additions and 0 deletions

View File

@ -18,6 +18,7 @@
package org.apache.hadoop.cli.util;
import org.apache.hadoop.util.Shell;
import java.util.regex.Pattern;
/**
@ -33,6 +34,10 @@ public class RegexpAcrossOutputComparator extends ComparatorBase {
@Override
public boolean compare(String actual, String expected) {
if (Shell.WINDOWS) {
actual = actual.replaceAll("\\r", "");
expected = expected.replaceAll("\\r", "");
}
return Pattern.compile(expected).matcher(actual).find();
}

View File

@ -632,6 +632,9 @@ Release 2.8.0 - UNRELEASED
HDFS-8219. setStoragePolicy with folder behavior is different after cluster restart.
(surendra singh lilhore via Xiaoyu Yao)
HDFS-8310. Fix TestCLI.testAll "help: help for find" on Windows.
(Kiran Kumar M R via Xiaoyu Yao)
Release 2.7.1 - UNRELEASED
INCOMPATIBLE CHANGES