Unverified Commit 15832892 authored by Jackson Gardner's avatar Jackson Gardner Committed by GitHub

Be tolerant of backticks around directory name in `pub` output. (#145768)

This fixes https://github.com/flutter/flutter/issues/145766

The output of the pub command changed slightly with this change: https://dart.googlesource.com/pub/+/2179b765aa9071386be02d408b3c3caa82af98f5

Update the tests to be tolerant of the directory path being surrounded by backticks (or not) so that we are compatible with the current and upcoming implementation.
parent 81f969e8
...@@ -218,9 +218,11 @@ void main() { ...@@ -218,9 +218,11 @@ void main() {
expect(mockStdio.stdout.writes.map(utf8.decode), expect(mockStdio.stdout.writes.map(utf8.decode),
allOf( allOf(
contains(matches(RegExp(r'Resolving dependencies in .+flutter_project\.\.\.'))), // The output of pub changed, adding backticks around the directory name.
// These regexes are tolerant of the backticks being present or absent.
contains(matches(RegExp(r'Resolving dependencies in .+flutter_project`?\.\.\.'))),
contains(matches(RegExp(r'\+ flutter 0\.0\.0 from sdk flutter'))), contains(matches(RegExp(r'\+ flutter 0\.0\.0 from sdk flutter'))),
contains(matches(RegExp(r'Changed \d+ dependencies in .+flutter_project!'))), contains(matches(RegExp(r'Changed \d+ dependencies in .+flutter_project`?!'))),
), ),
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment