Java 类org.apache.hadoop.fs.shell.CommandFormat.UnknownOptionException 实例源码

项目:hadoop-oss    文件:TestCommandFormat.java   
@Test
public void testOneOpt() {
  args = listOf("-a");
  expectedOpts = setOf("a");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hadoop-oss    文件:TestCommandFormat.java   
@Test
public void testTwoOpts() {
  args = listOf("-a", "-b");
  expectedOpts = setOf("a", "b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hadoop-oss    文件:TestCommandFormat.java   
@Test
public void testOptArg() {
  args = listOf("-a", "b");
  expectedOpts = setOf("a");
  expectedArgs = listOf("b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(null, 1, 1, "a", "b");
  checkArgLimits(null, 1, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 2, 2, "a", "b");
}
项目:hadoop-oss    文件:TestCommandFormat.java   
@Test
public void testOptStopOptArg() {
  args = listOf("-a", "--", "-b", "c");
  expectedOpts = setOf("a");
  expectedArgs = listOf("-b", "c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 1, "a", "b");
  checkArgLimits(null, 2, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "a", "b");
}
项目:hadoop-oss    文件:TestCommandFormat.java   
@Test
public void testOptDashArg() {
  args = listOf("-b", "-", "-c");
  expectedOpts = setOf("b");
  expectedArgs = listOf("-", "-c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "b", "c");
  checkArgLimits(TooManyArgumentsException.class, 1, 1, "b", "c");
  checkArgLimits(null, 2, 2, "b", "c");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "b", "c");
}
项目:hadoop    文件:TestCommandFormat.java   
@Test
public void testOneOpt() {
  args = listOf("-a");
  expectedOpts = setOf("a");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hadoop    文件:TestCommandFormat.java   
@Test
public void testTwoOpts() {
  args = listOf("-a", "-b");
  expectedOpts = setOf("a", "b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hadoop    文件:TestCommandFormat.java   
@Test
public void testOptArg() {
  args = listOf("-a", "b");
  expectedOpts = setOf("a");
  expectedArgs = listOf("b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(null, 1, 1, "a", "b");
  checkArgLimits(null, 1, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 2, 2, "a", "b");
}
项目:hadoop    文件:TestCommandFormat.java   
@Test
public void testOptStopOptArg() {
  args = listOf("-a", "--", "-b", "c");
  expectedOpts = setOf("a");
  expectedArgs = listOf("-b", "c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 1, "a", "b");
  checkArgLimits(null, 2, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "a", "b");
}
项目:hadoop    文件:TestCommandFormat.java   
@Test
public void testOptDashArg() {
  args = listOf("-b", "-", "-c");
  expectedOpts = setOf("b");
  expectedArgs = listOf("-", "-c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "b", "c");
  checkArgLimits(TooManyArgumentsException.class, 1, 1, "b", "c");
  checkArgLimits(null, 2, 2, "b", "c");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "b", "c");
}
项目:aliyun-oss-hadoop-fs    文件:TestCommandFormat.java   
@Test
public void testOneOpt() {
  args = listOf("-a");
  expectedOpts = setOf("a");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:aliyun-oss-hadoop-fs    文件:TestCommandFormat.java   
@Test
public void testTwoOpts() {
  args = listOf("-a", "-b");
  expectedOpts = setOf("a", "b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:aliyun-oss-hadoop-fs    文件:TestCommandFormat.java   
@Test
public void testOptArg() {
  args = listOf("-a", "b");
  expectedOpts = setOf("a");
  expectedArgs = listOf("b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(null, 1, 1, "a", "b");
  checkArgLimits(null, 1, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 2, 2, "a", "b");
}
项目:aliyun-oss-hadoop-fs    文件:TestCommandFormat.java   
@Test
public void testOptStopOptArg() {
  args = listOf("-a", "--", "-b", "c");
  expectedOpts = setOf("a");
  expectedArgs = listOf("-b", "c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 1, "a", "b");
  checkArgLimits(null, 2, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "a", "b");
}
项目:aliyun-oss-hadoop-fs    文件:TestCommandFormat.java   
@Test
public void testOptDashArg() {
  args = listOf("-b", "-", "-c");
  expectedOpts = setOf("b");
  expectedArgs = listOf("-", "-c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "b", "c");
  checkArgLimits(TooManyArgumentsException.class, 1, 1, "b", "c");
  checkArgLimits(null, 2, 2, "b", "c");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "b", "c");
}
项目:big-c    文件:TestCommandFormat.java   
@Test
public void testOneOpt() {
  args = listOf("-a");
  expectedOpts = setOf("a");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:big-c    文件:TestCommandFormat.java   
@Test
public void testTwoOpts() {
  args = listOf("-a", "-b");
  expectedOpts = setOf("a", "b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:big-c    文件:TestCommandFormat.java   
@Test
public void testOptArg() {
  args = listOf("-a", "b");
  expectedOpts = setOf("a");
  expectedArgs = listOf("b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(null, 1, 1, "a", "b");
  checkArgLimits(null, 1, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 2, 2, "a", "b");
}
项目:big-c    文件:TestCommandFormat.java   
@Test
public void testOptStopOptArg() {
  args = listOf("-a", "--", "-b", "c");
  expectedOpts = setOf("a");
  expectedArgs = listOf("-b", "c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 1, "a", "b");
  checkArgLimits(null, 2, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "a", "b");
}
项目:big-c    文件:TestCommandFormat.java   
@Test
public void testOptDashArg() {
  args = listOf("-b", "-", "-c");
  expectedOpts = setOf("b");
  expectedArgs = listOf("-", "-c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "b", "c");
  checkArgLimits(TooManyArgumentsException.class, 1, 1, "b", "c");
  checkArgLimits(null, 2, 2, "b", "c");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "b", "c");
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestCommandFormat.java   
@Test
public void testOneOpt() {
  args = listOf("-a");
  expectedOpts = setOf("a");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestCommandFormat.java   
@Test
public void testTwoOpts() {
  args = listOf("-a", "-b");
  expectedOpts = setOf("a", "b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestCommandFormat.java   
@Test
public void testOptArg() {
  args = listOf("-a", "b");
  expectedOpts = setOf("a");
  expectedArgs = listOf("b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(null, 1, 1, "a", "b");
  checkArgLimits(null, 1, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 2, 2, "a", "b");
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestCommandFormat.java   
@Test
public void testOptStopOptArg() {
  args = listOf("-a", "--", "-b", "c");
  expectedOpts = setOf("a");
  expectedArgs = listOf("-b", "c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 1, "a", "b");
  checkArgLimits(null, 2, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "a", "b");
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestCommandFormat.java   
@Test
public void testOptDashArg() {
  args = listOf("-b", "-", "-c");
  expectedOpts = setOf("b");
  expectedArgs = listOf("-", "-c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "b", "c");
  checkArgLimits(TooManyArgumentsException.class, 1, 1, "b", "c");
  checkArgLimits(null, 2, 2, "b", "c");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "b", "c");
}
项目:hadoop-plus    文件:TestCommandFormat.java   
@Test
public void testOneOpt() {
  args = listOf("-a");
  expectedOpts = setOf("a");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hadoop-plus    文件:TestCommandFormat.java   
@Test
public void testTwoOpts() {
  args = listOf("-a", "-b");
  expectedOpts = setOf("a", "b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hadoop-plus    文件:TestCommandFormat.java   
@Test
public void testOptArg() {
  args = listOf("-a", "b");
  expectedOpts = setOf("a");
  expectedArgs = listOf("b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(null, 1, 1, "a", "b");
  checkArgLimits(null, 1, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 2, 2, "a", "b");
}
项目:hadoop-plus    文件:TestCommandFormat.java   
@Test
public void testOptStopOptArg() {
  args = listOf("-a", "--", "-b", "c");
  expectedOpts = setOf("a");
  expectedArgs = listOf("-b", "c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 1, "a", "b");
  checkArgLimits(null, 2, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "a", "b");
}
项目:hadoop-plus    文件:TestCommandFormat.java   
@Test
public void testOptDashArg() {
  args = listOf("-b", "-", "-c");
  expectedOpts = setOf("b");
  expectedArgs = listOf("-", "-c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "b", "c");
  checkArgLimits(TooManyArgumentsException.class, 1, 1, "b", "c");
  checkArgLimits(null, 2, 2, "b", "c");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "b", "c");
}
项目:hops    文件:TestCommandFormat.java   
@Test
public void testOneOpt() {
  args = listOf("-a");
  expectedOpts = setOf("a");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hops    文件:TestCommandFormat.java   
@Test
public void testTwoOpts() {
  args = listOf("-a", "-b");
  expectedOpts = setOf("a", "b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hops    文件:TestCommandFormat.java   
@Test
public void testOptArg() {
  args = listOf("-a", "b");
  expectedOpts = setOf("a");
  expectedArgs = listOf("b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(null, 1, 1, "a", "b");
  checkArgLimits(null, 1, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 2, 2, "a", "b");
}
项目:hops    文件:TestCommandFormat.java   
@Test
public void testOptStopOptArg() {
  args = listOf("-a", "--", "-b", "c");
  expectedOpts = setOf("a");
  expectedArgs = listOf("-b", "c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 1, "a", "b");
  checkArgLimits(null, 2, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "a", "b");
}
项目:hops    文件:TestCommandFormat.java   
@Test
public void testOptDashArg() {
  args = listOf("-b", "-", "-c");
  expectedOpts = setOf("b");
  expectedArgs = listOf("-", "-c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "b", "c");
  checkArgLimits(TooManyArgumentsException.class, 1, 1, "b", "c");
  checkArgLimits(null, 2, 2, "b", "c");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "b", "c");
}
项目:hadoop-TCP    文件:TestCommandFormat.java   
@Test
public void testOneOpt() {
  args = listOf("-a");
  expectedOpts = setOf("a");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hadoop-TCP    文件:TestCommandFormat.java   
@Test
public void testTwoOpts() {
  args = listOf("-a", "-b");
  expectedOpts = setOf("a", "b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(null, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 1, 1, "a", "b");
}
项目:hadoop-TCP    文件:TestCommandFormat.java   
@Test
public void testOptArg() {
  args = listOf("-a", "b");
  expectedOpts = setOf("a");
  expectedArgs = listOf("b");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "a", "b");
  checkArgLimits(null, 0, 1, "a", "b");
  checkArgLimits(null, 1, 1, "a", "b");
  checkArgLimits(null, 1, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 2, 2, "a", "b");
}
项目:hadoop-TCP    文件:TestCommandFormat.java   
@Test
public void testOptStopOptArg() {
  args = listOf("-a", "--", "-b", "c");
  expectedOpts = setOf("a");
  expectedArgs = listOf("-b", "c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 1, "a", "b");
  checkArgLimits(null, 2, 2, "a", "b");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "a", "b");
}
项目:hadoop-TCP    文件:TestCommandFormat.java   
@Test
public void testOptDashArg() {
  args = listOf("-b", "-", "-c");
  expectedOpts = setOf("b");
  expectedArgs = listOf("-", "-c");

  checkArgLimits(UnknownOptionException.class, 0, 0);
  checkArgLimits(TooManyArgumentsException.class, 0, 0, "b", "c");
  checkArgLimits(TooManyArgumentsException.class, 1, 1, "b", "c");
  checkArgLimits(null, 2, 2, "b", "c");
  checkArgLimits(NotEnoughArgumentsException.class, 3, 4, "b", "c");
}