~ubuntu-branches/ubuntu/quantal/kdepim/quantal

« back to all changes in this revision

Viewing changes to messagecore/tests/stringutiltest.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:51 UTC
  • mto: This revision was merged to the branch mainline in revision 193.
  • Revision ID: package-import@ubuntu.com-20111215141751-bmhdpiwl23wd9w26
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
231
231
      ">>-------------------\n"
232
232
      "text6\n";
233
233
 
234
 
  QCOMPARE( StringUtil::stripSignature( test1, false ), test1Result );
 
234
  QCOMPARE( StringUtil::stripSignature( test1 ), test1Result );
235
235
 
236
236
 
237
237
  const QString test2 =
246
246
      "text6\n";
247
247
 
248
248
  // No actual signature - should stay the same
249
 
  QCOMPARE( StringUtil::stripSignature( test2, false ), test2 );
 
249
  QCOMPARE( StringUtil::stripSignature( test2 ), test2 );
250
250
 
251
251
  const QString test3 =
252
252
      "text1\n"
280
280
      ">text4\n"
281
281
      "text5\n";
282
282
 
283
 
  QCOMPARE( StringUtil::stripSignature( test3, false ), test3Result );
 
283
  QCOMPARE( StringUtil::stripSignature( test3 ), test3Result );
284
284
 
285
285
  const QString test4 =
286
286
      "Text 1\n"
308
308
      ">> --\n"
309
309
      ">> Not Signature block 3\n";
310
310
 
311
 
  QCOMPARE( StringUtil::stripSignature( test4, false ), test4Result );
 
311
  QCOMPARE( StringUtil::stripSignature( test4 ), test4Result );
312
312
 
313
313
  const QString test5 =
314
314
      "-- \n"
318
318
      "-- Tel.: 555 1234\n"
319
319
      "--";
320
320
 
321
 
  QCOMPARE( StringUtil::stripSignature( test5, false ), QString() );
 
321
  QCOMPARE( StringUtil::stripSignature( test5 ), QString() );
322
322
 
323
323
  const QString test6 =
324
324
      "Text 1\n\n\n\n"
332
332
      ">> Not Signature block 3\n";
333
333
 
334
334
  // Again, no actual signature in here
335
 
  QCOMPARE( StringUtil::stripSignature( test6, false ), test6 );
 
335
  QCOMPARE( StringUtil::stripSignature( test6 ), test6 );
336
336
}
337
337
 
338
338
void StringUtilTest::test_isCryptoPart()
355
355
    StringUtil::stripOffPrefixes( subject );
356
356
  }
357
357
}
 
358
 
 
359
#include "stringutiltest.moc"