OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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 import 'package:pathos/path.dart' as path; | 5 import 'package:pathos/path.dart' as path; |
6 import 'package:scheduled_test/scheduled_test.dart'; | 6 import 'package:scheduled_test/scheduled_test.dart'; |
7 | 7 |
8 import '../../../pub/entrypoint.dart'; | 8 import '../../../pub/entrypoint.dart'; |
9 import '../../../pub/io.dart'; | 9 import '../../../pub/io.dart'; |
10 import '../../../pub/validator.dart'; | 10 import '../../../pub/validator.dart'; |
(...skipping 16 matching lines...) Expand all Loading... |
27 d.dir(appPath, [ | 27 d.dir(appPath, [ |
28 d.libPubspec("test_pkg", "1.0.0"), | 28 d.libPubspec("test_pkg", "1.0.0"), |
29 d.dir("lib", [ | 29 d.dir("lib", [ |
30 d.file("thing.txt", "woo hoo") | 30 d.file("thing.txt", "woo hoo") |
31 ]) | 31 ]) |
32 ]).create(); | 32 ]).create(); |
33 expectNoValidationError(lib); | 33 expectNoValidationError(lib); |
34 }); | 34 }); |
35 }); | 35 }); |
36 | 36 |
37 integration('should consider a package invalid if it', () { | 37 group('should consider a package invalid if it', () { |
38 setUp(d.validPackage.create); | 38 setUp(d.validPackage.create); |
39 | 39 |
40 integration('has no lib directory', () { | 40 integration('has no lib directory', () { |
41 schedule(() => deleteEntry(path.join(sandboxDir, appPath, "lib"))); | 41 schedule(() => deleteEntry(path.join(sandboxDir, appPath, "lib"))); |
42 expectValidationError(lib); | 42 expectValidationError(lib); |
43 }); | 43 }); |
44 | 44 |
45 integration('has an empty lib directory', () { | 45 integration('has an empty lib directory', () { |
46 schedule(() => | 46 schedule(() => |
47 deleteEntry(path.join(sandboxDir, appPath, "lib", "test_pkg.dart"))); | 47 deleteEntry(path.join(sandboxDir, appPath, "lib", "test_pkg.dart"))); |
48 expectValidationError(lib); | 48 expectValidationError(lib); |
49 }); | 49 }); |
50 | 50 |
51 integration('has a lib directory containing only src', () { | 51 integration('has a lib directory containing only src', () { |
52 schedule(() => | 52 schedule(() => |
53 deleteEntry(path.join(sandboxDir, appPath, "lib", "test_pkg.dart"))); | 53 deleteEntry(path.join(sandboxDir, appPath, "lib", "test_pkg.dart"))); |
54 d.dir(appPath, [ | 54 d.dir(appPath, [ |
55 d.dir("lib", [ | 55 d.dir("lib", [ |
56 d.dir("src", [d.file("test_pkg.dart", "int i = 0;")]) | 56 d.dir("src", [d.file("test_pkg.dart", "int i = 0;")]) |
57 ]) | 57 ]) |
58 ]).create(); | 58 ]).create(); |
59 expectValidationError(lib); | 59 expectValidationError(lib); |
60 }); | 60 }); |
61 }); | 61 }); |
62 } | 62 } |
OLD | NEW |