Package models

Examples of models.Rule.matches()


        r.pattern = "\\w";
        assertFalse(r.matches("a"));
        assertTrue(r.matches("\\w"));

        r.pattern = "foo.";
        assertFalse(r.matches("foo"));
        assertFalse(r.matches("foox"));
        assertTrue(r.matches("foo."));

        r.pattern = "foo[";
        assertTrue(r.matches("foo["));
View Full Code Here


        assertFalse(r.matches("a"));
        assertTrue(r.matches("\\w"));

        r.pattern = "foo.";
        assertFalse(r.matches("foo"));
        assertFalse(r.matches("foox"));
        assertTrue(r.matches("foo."));

        r.pattern = "foo[";
        assertTrue(r.matches("foo["));
        assertFalse(r.matches("foox"));
View Full Code Here

        assertTrue(r.matches("\\w"));

        r.pattern = "foo.";
        assertFalse(r.matches("foo"));
        assertFalse(r.matches("foox"));
        assertTrue(r.matches("foo."));

        r.pattern = "foo[";
        assertTrue(r.matches("foo["));
        assertFalse(r.matches("foox"));
        assertFalse(r.matches("foo"));
View Full Code Here

        assertFalse(r.matches("foo"));
        assertFalse(r.matches("foox"));
        assertTrue(r.matches("foo."));

        r.pattern = "foo[";
        assertTrue(r.matches("foo["));
        assertFalse(r.matches("foox"));
        assertFalse(r.matches("foo"));

        r.pattern = "foo[]";
        assertTrue(r.matches("foo[]"));
View Full Code Here

        assertFalse(r.matches("foox"));
        assertTrue(r.matches("foo."));

        r.pattern = "foo[";
        assertTrue(r.matches("foo["));
        assertFalse(r.matches("foox"));
        assertFalse(r.matches("foo"));

        r.pattern = "foo[]";
        assertTrue(r.matches("foo[]"));
        assertFalse(r.matches("foox"));
View Full Code Here

        assertTrue(r.matches("foo."));

        r.pattern = "foo[";
        assertTrue(r.matches("foo["));
        assertFalse(r.matches("foox"));
        assertFalse(r.matches("foo"));

        r.pattern = "foo[]";
        assertTrue(r.matches("foo[]"));
        assertFalse(r.matches("foox"));
        assertFalse(r.matches("foo"));
View Full Code Here

        assertTrue(r.matches("foo["));
        assertFalse(r.matches("foox"));
        assertFalse(r.matches("foo"));

        r.pattern = "foo[]";
        assertTrue(r.matches("foo[]"));
        assertFalse(r.matches("foox"));
        assertFalse(r.matches("foo"));
    }

    @Test
View Full Code Here

        assertFalse(r.matches("foox"));
        assertFalse(r.matches("foo"));

        r.pattern = "foo[]";
        assertTrue(r.matches("foo[]"));
        assertFalse(r.matches("foox"));
        assertFalse(r.matches("foo"));
    }

    @Test
    public void testExtEquals() {
View Full Code Here

        assertFalse(r.matches("foo"));

        r.pattern = "foo[]";
        assertTrue(r.matches("foo[]"));
        assertFalse(r.matches("foox"));
        assertFalse(r.matches("foo"));
    }

    @Test
    public void testExtEquals() {
        Rule r = new Rule();
View Full Code Here

        Rule r = new Rule();
        r.type = RuleType.EXT_EQ;
        r.dest = "/tmp";

        r.pattern = null;
        assertFalse(r.matches("foo"));
        assertFalse(r.matches(null));
        assertFalse(r.matches(""));

        r.pattern = "pdf";
        assertFalse(r.matches("foo"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.