~ubuntu-branches/ubuntu/jaunty/kde4libs/jaunty-updates

« back to all changes in this revision

Viewing changes to kdecore/tests/kmimetypetest.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2008-12-11 18:26:08 UTC
  • mfrom: (1.1.24 upstream)
  • Revision ID: james.westby@ubuntu.com-20081211182608-tsu6p8ncbw1gnqxt
Tags: 4:4.1.85-0ubuntu1
* New upstream release
* Patches:
  + Removed 15_kfreebsd_support.diff from patches/series (doesn't apply and
    has no use for Ubuntu)
  + Redid 20_use_dejavu_as_default_font.diff
  + Completely removed kubuntu_09_fix_application_menu.diff (applied upstream)
  + Refreshed kubuntu_54_use_xdg_menu_prefix.diff
  + Dropped plasma/widgets/toolbutton.cpp from kubuntu_qt_ftbfs.diff (applied
    upstream)
  + Global quilt refresh

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
 
206
206
}
207
207
 
 
208
void KMimeTypeTest::testAdditionalGlobs_data()
 
209
{
 
210
    // Other globs that are not in shared-mime-info but which users could define themselves.
 
211
    QTest::addColumn<QString>("filename");
 
212
    QTest::addColumn<QString>("pattern");
 
213
    QTest::addColumn<bool>("expected");
 
214
 
 
215
    QTest::newRow("one star, match") << "foo.txt" << "*.txt" << true;
 
216
    QTest::newRow("two stars, match") << "andre.ts.001" << "*.ts.0*" << true;
 
217
    QTest::newRow("two stars, no match") << "andre.ts" << "*.ts.0*" << false;
 
218
}
 
219
 
 
220
void KMimeTypeTest::testAdditionalGlobs()
 
221
{
 
222
    QFETCH(QString, filename);
 
223
    QFETCH(QString, pattern);
 
224
    QFETCH(bool, expected);
 
225
 
 
226
    QCOMPARE(KMimeTypeFactory::matchFileName(filename, pattern), expected);
 
227
}
 
228
 
208
229
// All the simple tests for findByPath are in testFindByPathUsingFileName_data.
209
230
// In here we do the tests that need some content in a temporary file.
210
231
void KMimeTypeTest::testFindByPathWithContent()