use of org.apache.hadoop.fs.shell.find.Expression in project hadoop by apache.
the class TestFind method processOptionsPrint.
// check -print is handled correctly
@Test
public void processOptionsPrint() throws IOException {
Find find = new Find();
find.setConf(conf);
String args = "path -print";
String expected = "Print(;)";
find.processOptions(getArgs(args));
Expression expression = find.getRootExpression();
assertEquals(expected, expression.toString());
}
use of org.apache.hadoop.fs.shell.find.Expression in project hadoop by apache.
the class TestFind method processOptionsNoExpression.
// check print is used as the default expression
@Test
public void processOptionsNoExpression() throws IOException {
Find find = new Find();
find.setConf(conf);
String args = "path";
String expected = "Print(;)";
find.processOptions(getArgs(args));
Expression expression = find.getRootExpression();
assertEquals(expected, expression.toString());
}
Aggregations