sbt/main/src/test/scala
PandaMan 6d94d6db61
[2.x] fix: lastGrep ignores ANSI escape sequences when matching (#8726)
**Problem**
When `last` output includes ANSI escape sequences (e.g. colored `[error]` lines), `lastGrep <pattern>` was matching against the raw string. The pattern could fail to match because it was compared to text like `\u001B[31merror\u001B[0m` instead of `error`, or matching was inconsistent.

**Solution**
- Strip ANSI from each line before running the regex, using `EscHelpers.stripColorsAndMoves` from `sbt.internal.util`.
- **`Output.lastGrep`** (keys and file overloads): lines from the last run are stripped, then the pattern is applied to the stripped text; matching and printed lines are based on visible text.
- **`Output.grep`**: each line is stripped before `showMatches(pattern)` so the pattern is applied only to visible content.
2026-02-09 21:13:46 -08:00
..
sbt [2.x] fix: lastGrep ignores ANSI escape sequences when matching (#8726) 2026-02-09 21:13:46 -08:00
testpkg update .scalafmt.conf. enforce new scala 3 syntax 2025-01-02 11:25:34 +09:00
BuildPathsTest.scala Transfer copyright to Scala Center 2023-06-20 16:39:07 +02:00
ClasspathsTest.scala update .scalafmt.conf. enforce new scala 3 syntax 2025-01-02 11:25:34 +09:00
Delegates.scala update .scalafmt.conf. enforce new scala 3 syntax 2025-01-02 11:25:34 +09:00
ParseKeySpec.scala Fix ParseKeySpec flaky test when task name matches project name (#8326) 2026-01-08 20:55:14 -08:00
ParserSpec.scala update .scalafmt.conf. enforce new scala 3 syntax 2025-01-02 11:25:34 +09:00
PluginCommandTest.scala update .scalafmt.conf. enforce new scala 3 syntax 2025-01-02 11:25:34 +09:00
PluginsTest.scala Merge branch '1.10.x' into wip/merge-1.10.x 2024-05-07 04:39:25 -04:00
ProjectMacro.scala [2.x] feat: add rootProject macro (#8671) 2026-02-01 01:07:10 -05:00
ProjectSpec.scala Transfer copyright to Scala Center 2023-06-20 16:39:07 +02:00
SelectedFilterTest.scala [2.x] feat: Support ... as testOnly pattern (#8577) 2026-01-19 18:45:29 -05:00
TagsTest.scala update .scalafmt.conf. enforce new scala 3 syntax 2025-01-02 11:25:34 +09:00