Index: sdk/lib/_internal/pub/test/serve/warns_on_assets_paths_test.dart |
diff --git a/sdk/lib/_internal/pub/test/serve/warns_on_assets_paths_test.dart b/sdk/lib/_internal/pub/test/serve/warns_on_assets_paths_test.dart |
index c4ae0c5dd1a53ac0370d2d621bb3ddd901fa15c5..e77af93391e3367b814c17ab9fb7614a50c506e1 100644 |
--- a/sdk/lib/_internal/pub/test/serve/warns_on_assets_paths_test.dart |
+++ b/sdk/lib/_internal/pub/test/serve/warns_on_assets_paths_test.dart |
@@ -7,13 +7,14 @@ library pub_tests; |
import 'package:path/path.dart' as path; |
import 'package:scheduled_test/scheduled_test.dart'; |
+import '../../lib/src/utils.dart'; |
import '../descriptor.dart' as d; |
import '../test_pub.dart'; |
import 'utils.dart'; |
getWarningRegExp(String assetsPath) { |
// Escape backslashes since they are metacharacters in a regex. |
- assetsPath = assetsPath.replaceAll("\\", "\\\\"); |
+ assetsPath = quoteRegExp(assetsPath); |
return new RegExp( |
'^Warning: Pub reserves paths containing "assets" for using assets from ' |
'packages\\. Please rename the path "$assetsPath"\\.\$'); |