Imported Upstream version 3.3.1
[debian/amanda] / common-src / match-test.c
index 8737e56584829f1f101625be1d8cee42eb365c14..9be05efbe45674cb9a0bacdf8139f8407c2b26a6 100644 (file)
@@ -706,8 +706,10 @@ test_match_disk(void)
        { "\\\\\\\\windows\\\\share", "\\\\windows\\share", TRUE },
 
        /* other expressions */
-       { "^local", "/local", TRUE },
-       { "^local", "/local/vore", TRUE },
+       { "^local", "/local", FALSE },
+       { "^/local", "/local", TRUE },
+       { "^local", "/local/vore", FALSE },
+       { "^/local", "/local/vore", TRUE },
        { "^local", "/usr/local", FALSE },
 
        { "local/bin", "/local/bin", TRUE },
@@ -740,7 +742,41 @@ test_match_disk(void)
        { "/usr\\/bin", "/usr/bin", TRUE },
        { "^/usr\\/bin$", "/usr/bin", TRUE },
        { "\\/usr\\/bin", "/usr/bin", FALSE },
-       { "^\\/usr\\/bin$", "/usr/bin", FALSE },
+       { "^\\/usr\\/bin$", "/usr/bin", TRUE },
+       { "/usr\\/bin\\/", "/usr/bin/", TRUE },
+       { "^/usr\\/bin\\/$", "/usr/bin/", TRUE },
+       { "\\/usr\\/bin\\/", "/usr/bin/", FALSE },
+       { "^\\/usr\\/bin\\/$", "/usr/bin/", TRUE },
+
+       { "oracle", "oracle", TRUE },
+       { "oracle", "/oracle", TRUE },
+       { "oracle", "oracle/", TRUE },
+       { "oracle", "/oracle/", TRUE },
+       { "/oracle", "oracle", TRUE },
+       { "/oracle", "/oracle", TRUE },
+       { "/oracle", "oracle/", TRUE },
+       { "/oracle", "/oracle/", TRUE },
+       { "^oracle", "oracle", TRUE },
+       { "^oracle", "/oracle", FALSE },
+       { "^oracle", "oracle/", TRUE },
+       { "^oracle", "/oracle/", FALSE },
+       { "^/oracle", "oracle", FALSE },
+       { "^/oracle", "/oracle", TRUE },
+       { "^/oracle", "oracle/", FALSE },
+       { "^/oracle", "/oracle/", TRUE },
+
+       { "oracle", "oracle", TRUE },
+       { "oracle", "/oracle", TRUE },
+       { "oracle", "oracle/", TRUE },
+       { "oracle", "/oracle/", TRUE },
+       { "oracle$", "oracle", TRUE },
+       { "oracle$", "/oracle", TRUE },
+       { "oracle$", "oracle/", FALSE },
+       { "oracle$", "/oracle/", FALSE },
+       { "oracle/$", "oracle", FALSE },
+       { "oracle/$", "/oracle", FALSE },
+       { "oracle/$", "oracle/", TRUE },
+       { "oracle/$", "/oracle/", TRUE },
 
        { NULL, NULL, FALSE },
     }, *t;