Skip to content

Commit 1583289

Browse files
Be tolerant of backticks around directory name in pub output. (#145768)
This fixes flutter/flutter#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.
1 parent 81f969e commit 1583289

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/flutter_tools/test/commands.shard/permeable/packages_test.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,11 @@ void main() {
218218

219219
expect(mockStdio.stdout.writes.map(utf8.decode),
220220
allOf(
221-
contains(matches(RegExp(r'Resolving dependencies in .+flutter_project\.\.\.'))),
221+
// The output of pub changed, adding backticks around the directory name.
222+
// These regexes are tolerant of the backticks being present or absent.
223+
contains(matches(RegExp(r'Resolving dependencies in .+flutter_project`?\.\.\.'))),
222224
contains(matches(RegExp(r'\+ flutter 0\.0\.0 from sdk flutter'))),
223-
contains(matches(RegExp(r'Changed \d+ dependencies in .+flutter_project!'))),
225+
contains(matches(RegExp(r'Changed \d+ dependencies in .+flutter_project`?!'))),
224226
),
225227
);
226228

0 commit comments

Comments
 (0)