calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / tools / qa / cppunit / test_Wildcard.cxx
blob1760ca6932db02a3f49b308135d758f4a5312e45
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include <sal/config.h>
12 #include <sal/types.h>
13 #include <cppunit/TestAssert.h>
14 #include <cppunit/TestFixture.h>
15 #include <cppunit/extensions/HelperMacros.h>
16 #include <tools/wldcrd.hxx>
18 namespace
20 class Test : public CppUnit::TestFixture
22 public:
23 void test_Wildcard();
25 CPPUNIT_TEST_SUITE(Test);
26 CPPUNIT_TEST(test_Wildcard);
27 CPPUNIT_TEST_SUITE_END();
30 void Test::test_Wildcard()
32 WildCard wildcard(u"*.html;*??a;*\\*abc;*\\?xyz", ';'); // tdf#148253
33 CPPUNIT_ASSERT(wildcard.Matches(u"foo.html"));
34 CPPUNIT_ASSERT(wildcard.Matches(u"foo.ht.html")); // test stepping back after partial match
35 CPPUNIT_ASSERT(wildcard.Matches(u"foo.html.html")); // test stepping back after full match
36 CPPUNIT_ASSERT(wildcard.Matches(u"??aa")); // test stepping back with question marks
37 CPPUNIT_ASSERT(wildcard.Matches(u"111*abc")); // test escaped asterisk
38 CPPUNIT_ASSERT(!wildcard.Matches(u"111-abc")); // test escaped asterisk
39 CPPUNIT_ASSERT(wildcard.Matches(u"111?xyz")); // test escaped question mark
40 CPPUNIT_ASSERT(!wildcard.Matches(u"111-xyz")); // test escaped question mark
43 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */