MCPcopy Create free account
hub / github.com/IJHack/QtPass / parseGrepOutputMultipleEntries

Method parseGrepOutputMultipleEntries

tests/auto/util/tst_util.cpp:1844–1853  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1842}
1843
1844void tst_util::parseGrepOutputMultipleEntries() {
1845 const QString raw = QStringLiteral("\x1B[94mentry/a\x1B[0m:\nline1\nline2\n"
1846 "\x1B[94mentry/b\x1B[0m:\nlineX\n");
1847 auto results = parseGrepOutput(raw);
1848 QCOMPARE(results.size(), 2);
1849 QCOMPARE(results[0].first, QStringLiteral("entry/a"));
1850 QCOMPARE(results[0].second.size(), 2);
1851 QCOMPARE(results[1].first, QStringLiteral("entry/b"));
1852 QCOMPARE(results[1].second.size(), 1);
1853}
1854
1855void tst_util::parseGrepOutputAnsiStripped() {
1856 // Match line itself contains ANSI colour (grep highlights the match)

Callers

nothing calls this directly

Calls 1

parseGrepOutputFunction · 0.85

Tested by

no test coverage detected