Index: sdk/lib/_internal/pub/test/serve/web_socket/path_to_urls_test.dart |
diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/path_to_urls_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/path_to_urls_test.dart |
index ce6b6208dff4a1f1d656e01a068faada288f03de..5ab621385f8c3b2ceb40c6179f5233d298beda5c 100644 |
--- a/sdk/lib/_internal/pub/test/serve/web_socket/path_to_urls_test.dart |
+++ b/sdk/lib/_internal/pub/test/serve/web_socket/path_to_urls_test.dart |
@@ -7,6 +7,7 @@ library pub_tests; |
import 'package:path/path.dart' as p; |
import 'package:scheduled_test/scheduled_test.dart'; |
+import '../../../lib/src/io.dart'; |
import '../../descriptor.dart' as d; |
import '../../test_pub.dart'; |
import '../utils.dart'; |
@@ -130,10 +131,15 @@ main() { |
getServerUrl("randomdir", "packages/foo/foo.dart") |
]}); |
+ // Note: Using canonicalize here because pub gets the path to the |
+ // entrypoint package from the working directory, which has had symlinks |
+ // resolve. On Mac, "/tmp" is actually a symlink to "/private/tmp", so we |
+ // need to accomodate that. |
+ |
// An absolute path to another package's lib/ directory. |
expectWebSocketCall({ |
"command": "pathToUrls", |
- "path": p.join(sandboxDir, "foo", "lib", "foo.dart") |
+ "path": canonicalize(p.join(sandboxDir, "foo", "lib", "foo.dart")) |
}, replyEquals: {"urls": [ |
getServerUrl("test", "packages/foo/foo.dart"), |
getServerUrl("web", "packages/foo/foo.dart"), |
@@ -153,7 +159,7 @@ main() { |
// An absolute path to another package's asset/ directory. |
expectWebSocketCall({ |
"command": "pathToUrls", |
- "path": p.join(sandboxDir, "foo", "asset", "foo.dart") |
+ "path": canonicalize(p.join(sandboxDir, "foo", "asset", "foo.dart")) |
}, replyEquals: {"urls": [ |
getServerUrl("test", "assets/foo/foo.dart"), |
getServerUrl("web", "assets/foo/foo.dart"), |