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

Side by Side Diff: sdk/lib/_internal/pub_generated/test/validator/executable_test.dart

Issue 937243002: Revert "Revert "Use native async/await support in pub."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
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.
4
5 import 'package:scheduled_test/scheduled_test.dart';
6
7 import '../../lib/src/entrypoint.dart';
8 import '../../lib/src/validator.dart';
9 import '../../lib/src/validator/executable.dart';
10 import '../descriptor.dart' as d;
11 import '../test_pub.dart';
12 import 'utils.dart';
13
14 Validator executable(Entrypoint entrypoint) =>
15 new ExecutableValidator(entrypoint);
16
17 main() {
18 initConfig();
19
20 setUp(d.validPackage.create);
21
22 group('should consider a package valid if it', () {
23 integration('has executables that are present', () {
24 d.dir(appPath, [d.pubspec({
25 "name": "test_pkg",
26 "version": "1.0.0",
27 "executables": {
28 "one": "one_script",
29 "two": null
30 }
31 }),
32 d.dir(
33 "bin",
34 [
35 d.file("one_script.dart", "main() => print('ok');"),
36 d.file("two.dart", "main() => print('ok');")])]).create();
37 expectNoValidationError(executable);
38 });
39 });
40
41 group("should consider a package invalid if it", () {
42 integration('is missing one or more listed executables', () {
43 d.dir(appPath, [d.pubspec({
44 "name": "test_pkg",
45 "version": "1.0.0",
46 "executables": {
47 "nope": "not_there",
48 "nada": null
49 }
50 })]).create();
51 expectValidationWarning(executable);
52 });
53 });
54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698