match.c - surf-adblock - Surf adblock web extension
 (HTM) git clone git://git.codemadness.org/surf-adblock
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       match.c (902B)
       ---
            1 #include "../adblock.c"
            2 
            3 int
            4 main(void)
            5 {
            6         int m;
            7 
            8         m = match("a", "a", 1);
            9         printf("%d = 0\n", m);
           10 
           11         m = match("a*", "a", 1);
           12         printf("%d = 0\n", m);
           13 
           14         m = match("*a", "a", 1);
           15         printf("%d = 0\n", m);
           16 
           17         m = match("*a*", "a", 1);
           18         printf("%d = 0\n", m);
           19 
           20         m = match("^*", "/index.html", 1);
           21         printf("%d = 0\n", m);
           22 
           23         m = match("*^*", "/index.html", 1);
           24         printf("%d = 0\n", m);
           25 
           26         m = match("*^*", "a/index.html", 1);
           27         printf("%d = 0\n", m);
           28 
           29         m = match("*/*", "a/index.html", 1);
           30         printf("%d = 0\n", m);
           31 
           32         m = match("*^i*", "a/index.html", 1);
           33         printf("%d = 0\n", m);
           34 
           35         m = match("a^i*", "a/index.html", 1);
           36         printf("%d = 0\n", m);
           37 
           38         m = match("b^i*", "a/index.html", 1);
           39         printf("%d = 1\n", m);
           40 
           41         m = match("a^^i*", "a/index.html", 1);
           42         printf("%d = 1\n", m);
           43 
           44         m = match("^^i*", "a/index.html", 1);
           45         printf("%d = 1\n", m);
           46 
           47         m = match("^^i*", "a/index.html", 1);
           48         printf("%d = 1\n", m);
           49 
           50         return 0;
           51 }