*/
package org.sonar.api.utils;
-import org.junit.Test;
-
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
+import org.junit.Test;
+
public class WildcardPatternTest {
private boolean match(String pattern, String value, String separator) {
assertTrue(match("**", "java/io/Reader"));
}
+ /**
+ * See http://jira.codehaus.org/browse/SONAR-2193
+ */
+ @Ignore
+ @Test
+ public void issue2193() {
+ assertTrue(match("**/app/**", "com.app.Utils", "."));
+ assertFalse(match("**/app/**", "com.application.MyService", "."));
+
+ assertTrue(match("**/app/**", "com/app/Utils"));
+ assertFalse(match("**/app/**", "com/application/MyService"));
+ }
+
@Test
public void multiplePatterns() {
WildcardPattern[] patterns = new WildcardPattern[] { WildcardPattern.create("Foo"), WildcardPattern.create("Bar") };