| 1905 | } |
| 1906 | |
| 1907 | void 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 | |
| 1921 | void tst_util::parseGrepOutputPlainTextHeaders() { |
| 1922 | // pass grep without ANSI colours (e.g. NO_COLOR or non-TTY output) |
nothing calls this directly
no test coverage detected