/*
 * @author Ranides Atterwim <ranides@gmail.com>
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */
package net.ranides.assira.text;

import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author ranides
 */
public class WildcardTest {
	
	@Test
	public void testTest() {
		assertTrue(Wildcard.compile("a*b").test("artb"));
		assertTrue(Wildcard.compile("a*b").test("ab"));
		assertFalse(Wildcard.compile("a*b").test("abc"));
		assertTrue(Wildcard.compile("a*b*").test("abc"));
		assertFalse(Wildcard.compile("a*b*").test("acde"));
        
        assertTrue(Wildcard.compile("a?b?").test("aqbc"));
        assertTrue(Wildcard.compile("a?b?").test("abbd"));
        assertFalse(Wildcard.compile("a?b?").test("abcd"));
	}
	
}
