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

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

Issue 566093003: Create binstubs for executables when activating a package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise! Created 6 years, 3 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 import 'package:scheduled_test/scheduled_test.dart';
2 import '../../lib/src/entrypoint.dart';
3 import '../../lib/src/validator.dart';
4 import '../../lib/src/validator/executable.dart';
5 import '../descriptor.dart' as d;
6 import '../test_pub.dart';
7 import 'utils.dart';
8 Validator executable(Entrypoint entrypoint) =>
9 new ExecutableValidator(entrypoint);
10 main() {
11 initConfig();
12 setUp(d.validPackage.create);
13 group('should consider a package valid if it', () {
14 integration('has executables that are present', () {
15 d.dir(appPath, [d.pubspec({
16 "name": "test_pkg",
17 "version": "1.0.0",
18 "executables": {
19 "one": "one_script",
20 "two": null
21 }
22 }),
23 d.dir(
24 "bin",
25 [
26 d.file("one_script.dart", "main() => print('ok');"),
27 d.file("two.dart", "main() => print('ok');")])]).create();
28 expectNoValidationError(executable);
29 });
30 });
31 group("should consider a package invalid if it", () {
32 integration('is missing one or more listed executables', () {
33 d.dir(appPath, [d.pubspec({
34 "name": "test_pkg",
35 "version": "1.0.0",
36 "executables": {
37 "nope": "not_there",
38 "nada": null
39 }
40 })]).create();
41 expectValidationWarning(executable);
42 });
43 });
44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698