diff --git a/pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java b/pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java index 6454c94f6..310a3c2b2 100644 --- a/pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java +++ b/pitest-entry/src/main/java/org/pitest/mutationtest/config/SettingsFactory.java @@ -112,11 +112,11 @@ public void describeFeatures(Consumer enabled, Consumer disabl public void checkRequestedFeatures() { FeatureParser parser = new FeatureParser(); Set available = this.plugins.findFeatures().stream() - .map(f -> f.provides().name()) + .map(f -> f.provides().name().toUpperCase()) .collect(Collectors.toSet()); Optional unknown = parser.parseFeatures(this.options.getFeatures()).stream() - .filter(f -> !available.contains(f.feature())) + .filter(f -> !available.contains(f.feature().toUpperCase())) .findAny(); unknown.ifPresent(setting -> { diff --git a/pitest-entry/src/test/java/org/pitest/mutationtest/config/SettingsFactoryTest.java b/pitest-entry/src/test/java/org/pitest/mutationtest/config/SettingsFactoryTest.java index cdd540913..b6e959bc4 100644 --- a/pitest-entry/src/test/java/org/pitest/mutationtest/config/SettingsFactoryTest.java +++ b/pitest-entry/src/test/java/org/pitest/mutationtest/config/SettingsFactoryTest.java @@ -137,4 +137,13 @@ public void shouldErrorWhenUnkownFeatureRequested() { } + @Test + public void shouldTreatFeaturesAsCaseInsensitive() { + this.options.setFeatures(Arrays.asList("+feNUm")); + + assertThatCode( () ->this.testee.checkRequestedFeatures()) + .doesNotThrowAnyException(); + + } + }