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

Method parseGrepOutputEmbeddedBlueNotHeader

tests/auto/util/tst_util.cpp:1907–1919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1905}
1906
1907void tst_util::parseGrepOutputEmbeddedBlueNotHeader() {
1908 // Match line contains \x1B[94m mid-line (grep highlights the search term in
1909 // blue); must not be mistaken for a header — previous matches must not be
1910 // lost
1911 const QString raw = QStringLiteral(
1912 "\x1B[94mentry/a\x1B[0m:\nfirst match\ncontains \x1B[94mblue\x1B[0m "
1913 "highlight\n\x1B[94mentry/b\x1B[0m:\nother\n");
1914 auto results = parseGrepOutput(raw);
1915 QCOMPARE(results.size(), 2);
1916 QCOMPARE(results[0].first, QStringLiteral("entry/a"));
1917 QCOMPARE(results[0].second.size(), 2);
1918 QCOMPARE(results[0].second[1], QStringLiteral("contains blue highlight"));
1919}
1920
1921void tst_util::parseGrepOutputPlainTextHeaders() {
1922 // pass grep without ANSI colours (e.g. NO_COLOR or non-TTY output)

Callers

nothing calls this directly

Calls 1

parseGrepOutputFunction · 0.85

Tested by

no test coverage detected