Changeset View
Changeset View
Standalone View
Standalone View
autotests/syntaxrepository_test.cpp
Show First 20 Lines • Show All 402 Lines • ▼ Show 20 Line(s) | 371 | { | |||
---|---|---|---|---|---|
403 | } | 403 | } | ||
404 | } | 404 | } | ||
405 | 405 | | |||
406 | void testDelimiters() | 406 | void testDelimiters() | ||
407 | { | 407 | { | ||
408 | auto def = m_repo.definitionForName(QLatin1String("LaTeX")); | 408 | auto def = m_repo.definitionForName(QLatin1String("LaTeX")); | ||
409 | QVERIFY(def.isValid()); | 409 | QVERIFY(def.isValid()); | ||
410 | 410 | | |||
411 | // check that backslash '\' is removed | 411 | // check that backslash '\' and '*' are removed | ||
412 | for (QChar c : QStringLiteral("\t !%&()*+,-./:;<=>?[]^{|}~")) | 412 | for (QChar c : QStringLiteral("\t !%&()+,-./:;<=>?[]^{|}~")) | ||
413 | QVERIFY(def.isWordDelimiter(c)); | 413 | QVERIFY(def.isWordDelimiter(c)); | ||
414 | QVERIFY(!def.isWordDelimiter(QLatin1Char('\\'))); | 414 | QVERIFY(!def.isWordDelimiter(QLatin1Char('\\'))); | ||
415 | 415 | | |||
416 | // check where breaking a line is valid | 416 | // check where breaking a line is valid | ||
417 | for (QChar c : QStringLiteral(",{}[]")) | 417 | for (QChar c : QStringLiteral(",{}[]")) | ||
418 | QVERIFY(def.isWordWrapDelimiter(c)); | 418 | QVERIFY(def.isWordWrapDelimiter(c)); | ||
419 | } | 419 | } | ||
420 | 420 | | |||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |