Chromium Code Reviews| Index: sdk/lib/_internal/pub/test/build/warns_on_assets_paths_test.dart |
| diff --git a/sdk/lib/_internal/pub/test/build/warns_on_assets_paths_test.dart b/sdk/lib/_internal/pub/test/build/warns_on_assets_paths_test.dart |
| index 67eb1b5925ae2f0a19faca1fe9a8b2ddeccf7bbb..90c69f0b9bcb3c4da7e1ef375b753705715a602f 100644 |
| --- a/sdk/lib/_internal/pub/test/build/warns_on_assets_paths_test.dart |
| +++ b/sdk/lib/_internal/pub/test/build/warns_on_assets_paths_test.dart |
| @@ -9,9 +9,13 @@ import 'package:path/path.dart' as path; |
| import '../descriptor.dart' as d; |
| import '../test_pub.dart'; |
| -getWarningRegExp(String assetsPath) => new RegExp( |
| - '^Warning: Pub reserves paths containing "assets" for using assets from ' |
| - 'packages\\. Please rename the path "$assetsPath"\\.\$'); |
| +getWarningRegExp(String assetsPath) { |
| + // Escape backslashes since they are metacharacters in a regex. |
| + assetsPath = assetsPath.replaceAll("\\", "\\\\"); |
|
nweiz
2013/12/19 19:34:34
We should have a regExpQuote function in utils (wi
Bob Nystrom
2013/12/19 23:31:12
Since this is already in, I don't think it's worth
nweiz
2013/12/19 23:36:05
I'm uncomfortable with the idea of TBRing somethin
Bob Nystrom
2013/12/27 22:53:01
Gah, you're exactly right. I apologize.
|
| + return new RegExp( |
| + '^Warning: Pub reserves paths containing "assets" for using assets from ' |
|
nweiz
2013/12/19 19:34:34
Use r"" strings for these.
Bob Nystrom
2013/12/19 23:31:12
The second line is using interpolation, and I thin
|
| + 'packages\\. Please rename the path "$assetsPath"\\.\$'); |
| +} |
| main() { |
| initConfig(); |