@Test public void abbreviation() { OptionSet options = parser.parse("--W", "silent"); assertOptionDetected(options, "Wally"); assertOptionNotDetected(options, "W"); assertEquals(singletonList("silent"), options.valuesOf("Wally")); assertEquals(emptyList(), options.nonOptionArguments()); }
@Test public void wExtensionWithLongOptionWithoutAnArgument() { OptionSet options = parser.parse("-W", "silent"); assertOptionNotDetected(options, "W"); assertOptionDetected(options, "silent"); assertEquals(emptyList(), options.valuesOf("silent")); assertEquals(emptyList(), options.nonOptionArguments()); }