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

Side by Side Diff: sdk/lib/_internal/pub/test/pubspec_test.dart

Issue 463203002: "publishTo" -> "publish_to". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/pub/test/lish/uses_publish_to_url_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pubspec_test; 5 library pubspec_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 }); 414 });
415 }); 415 });
416 416
417 group("publishTo", () { 417 group("publishTo", () {
418 test("defaults to null if omitted", () { 418 test("defaults to null if omitted", () {
419 var pubspec = new Pubspec.parse('', sources); 419 var pubspec = new Pubspec.parse('', sources);
420 expect(pubspec.publishTo, isNull); 420 expect(pubspec.publishTo, isNull);
421 }); 421 });
422 422
423 test("throws if not a string", () { 423 test("throws if not a string", () {
424 expectPubspecException('publishTo: 123', 424 expectPubspecException('publish_to: 123',
425 (pubspec) => pubspec.publishTo); 425 (pubspec) => pubspec.publishTo);
426 }); 426 });
427 427
428 test("allows a URL", () { 428 test("allows a URL", () {
429 var pubspec = new Pubspec.parse(''' 429 var pubspec = new Pubspec.parse('''
430 publishTo: http://example.com 430 publish_to: http://example.com
431 ''', sources); 431 ''', sources);
432 expect(pubspec.publishTo, equals("http://example.com")); 432 expect(pubspec.publishTo, equals("http://example.com"));
433 }); 433 });
434 434
435 test("allows none", () { 435 test("allows none", () {
436 var pubspec = new Pubspec.parse(''' 436 var pubspec = new Pubspec.parse('''
437 publishTo: none 437 publish_to: none
438 ''', sources); 438 ''', sources);
439 expect(pubspec.publishTo, equals("none")); 439 expect(pubspec.publishTo, equals("none"));
440 }); 440 });
441 441
442 test("throws on other strings", () { 442 test("throws on other strings", () {
443 expectPubspecException('publishTo: http://bad.url:not-port', 443 expectPubspecException('publish_to: http://bad.url:not-port',
444 (pubspec) => pubspec.publishTo); 444 (pubspec) => pubspec.publishTo);
445 }); 445 });
446 }); 446 });
447 }); 447 });
448 } 448 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/test/lish/uses_publish_to_url_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698