public void DoesPathContainsWildcardsTests()
 {
     XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("\\\\?\\c:\\foo\\bar\\?"), true);
     XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("\\\\?\\c:\\foo\\bar\\*"), true);
     XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("\\\\?\\c:\\foo\\bar\\a"), false);
     XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("c:\\foo\\bar\\?"), true);
     XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("c:\\foo\\bar\\*"), true);
     XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("c:\\foo\\bar\\a"), false);
     XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("ab?cd"), true);
     XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("abcd"), false);
 }
Example #2
0
        public void DoesPathContainsWildcardsTests()
        {
            if (OperatingSystemHelper.IsUnixOS)
            {
                XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("/some/path/without/wildcard"), false);
                XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("/some/path/with/wildcard/*"), true);
                XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("/some/*/with/wildcard/*"), true);
            }
            else
            {
                XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("\\\\?\\c:\\foo\\bar\\?"), true);
                XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("\\\\?\\c:\\foo\\bar\\*"), true);
                XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("\\\\?\\c:\\foo\\bar\\a"), false);
                XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("c:\\foo\\bar\\?"), true);
                XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("c:\\foo\\bar\\*"), true);
                XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("c:\\foo\\bar\\a"), false);
            }

            XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("ab?cd"), true);
            XAssert.AreEqual(ReportedFileAccess.DoesPathContainsWildcards("abcd"), false);
        }