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

Unified Diff: utils/tests/pub/install/hosted/install_test.dart

Issue 12328021: Make sure package names are URL encoded. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: URL encode version too. Created 7 years, 10 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 | « utils/pub/validator/name.dart ('k') | utils/tests/pub/validator_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/install/hosted/install_test.dart
diff --git a/utils/tests/pub/install/hosted/install_test.dart b/utils/tests/pub/install/hosted/install_test.dart
index 1ed4f404e9f58878424cb6e2bb9663d3dfb45647..5bc120c3d7a9c2d4cc57e6b9e8e193bfd2adab3f 100644
--- a/utils/tests/pub/install/hosted/install_test.dart
+++ b/utils/tests/pub/install/hosted/install_test.dart
@@ -9,6 +9,7 @@ import 'dart:io';
import '../../test_pub.dart';
main() {
+ initConfig();
integration('installs a package from a pub server', () {
servePackages([package("foo", "1.2.3")]);
@@ -20,4 +21,15 @@ main() {
cacheDir({"foo": "1.2.3"}).scheduleValidate();
packagesDir({"foo": "1.2.3"}).scheduleValidate();
});
+
+ integration('URL encodes the package name', () {
+ servePackages([]);
+
+ appDir([dependency("bad name!", "1.2.3")]).scheduleCreate();
+
+ schedulePub(args: ['install'],
+ error: new RegExp('Could not find package "bad name!" at '
+ 'http://localhost:'),
+ exitCode: 1);
+ });
}
« no previous file with comments | « utils/pub/validator/name.dart ('k') | utils/tests/pub/validator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698