Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: sdk/lib/_internal/pub/test/serve/web_socket/path_to_urls_test.dart

Issue 196173009: Fix path_to_urls test on Mac. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/pub/pub.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"),
« no previous file with comments | « sdk/lib/_internal/pub/pub.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698