Changeset View
Changeset View
Standalone View
Standalone View
autotests/kemailaddresstest.cpp
Show First 20 Lines • Show All 336 Lines • ▼ Show 20 Line(s) | 335 | QTest::newRow("6") << "Martin Schulte <martin.schulte@guug.de.>," | |||
---|---|---|---|---|---|
337 | << AddressOk; | 337 | << AddressOk; | ||
338 | 338 | | |||
339 | } | 339 | } | ||
340 | 340 | | |||
341 | void KEmailAddressTest::testIsValidSimpleEmailAddress() | 341 | void KEmailAddressTest::testIsValidSimpleEmailAddress() | ||
342 | { | 342 | { | ||
343 | QFETCH(QString, input); | 343 | QFETCH(QString, input); | ||
344 | QFETCH(bool, expResult); | 344 | QFETCH(bool, expResult); | ||
345 | 345 | | |||
dfaure: unrelated and the empty line made sense, please revert | |||||
346 | QCOMPARE(isValidSimpleAddress(input), expResult); | 346 | QCOMPARE(isValidSimpleAddress(input), expResult); | ||
347 | } | 347 | } | ||
348 | 348 | | |||
349 | void KEmailAddressTest::testIsValidSimpleEmailAddress_data() | 349 | void KEmailAddressTest::testIsValidSimpleEmailAddress_data() | ||
350 | { | 350 | { | ||
351 | QTest::addColumn<QString>("input"); | 351 | QTest::addColumn<QString>("input"); | ||
352 | QTest::addColumn<bool>("expResult"); | 352 | QTest::addColumn<bool>("expResult"); | ||
353 | 353 | | |||
Show All 40 Lines | |||||
394 | QTest::newRow("") << "bar=matt@fruitsalad.org" << true; | 394 | QTest::newRow("") << "bar=matt@fruitsalad.org" << true; | ||
395 | QTest::newRow("") << "jongel-matt@fruitsalad.org" << true; | 395 | QTest::newRow("") << "jongel-matt@fruitsalad.org" << true; | ||
396 | QTest::newRow("") << "matt-@fruitsalad.org" << true; | 396 | QTest::newRow("") << "matt-@fruitsalad.org" << true; | ||
397 | 397 | | |||
398 | // check if the pure email address is wrong | 398 | // check if the pure email address is wrong | ||
399 | QTest::newRow("") << "mattfruitsalad.org" << false; | 399 | QTest::newRow("") << "mattfruitsalad.org" << false; | ||
400 | QTest::newRow("") << "matt@[123.123.123.123" << false; | 400 | QTest::newRow("") << "matt@[123.123.123.123" << false; | ||
401 | QTest::newRow("") << "matt@123.123.123.123]" << false; | 401 | QTest::newRow("") << "matt@123.123.123.123]" << false; | ||
402 | QTest::newRow("") << "matt@[.123.123.123]" << false; | ||||
403 | QTest::newRow("") << "matt@[123.123.123]" << false; | ||||
402 | QTest::newRow("") << "\"matt@fruitsalad.org" << false; | 404 | QTest::newRow("") << "\"matt@fruitsalad.org" << false; | ||
403 | QTest::newRow("") << "matt\"@fruitsalad.org" << false; | 405 | QTest::newRow("") << "matt\"@fruitsalad.org" << false; | ||
404 | QTest::newRow("") << QString() << false; | 406 | QTest::newRow("") << QString() << false; | ||
405 | 407 | | |||
406 | // BUG 203881 | 408 | // BUG 203881 | ||
407 | QTest::newRow("") << "2advance@my-site.com" << true; | 409 | QTest::newRow("") << "2advance@my-site.com" << true; | ||
408 | 410 | | |||
409 | // and here some insane but still valid cases | 411 | // and here some insane but still valid cases | ||
▲ Show 20 Lines • Show All 176 Lines • Show Last 20 Lines |
unrelated and the empty line made sense, please revert