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:path/path.dart' as path; | 5 import 'package:path/path.dart' as path; |
6 import 'package:pub/src/entrypoint.dart'; | 6 import 'package:pub/src/entrypoint.dart'; |
7 import 'package:pub/src/io.dart'; | 7 import 'package:pub/src/io.dart'; |
8 import 'package:pub/src/validator.dart'; | 8 import 'package:pub/src/validator.dart'; |
9 import 'package:pub/src/validator/license.dart'; | 9 import 'package:pub/src/validator/license.dart'; |
10 import 'package:scheduled_test/scheduled_test.dart'; | 10 import 'package:scheduled_test/scheduled_test.dart'; |
(...skipping 22 matching lines...) Expand all Loading... |
33 expectNoValidationError(license); | 33 expectNoValidationError(license); |
34 }); | 34 }); |
35 | 35 |
36 integration('has a suffixed LICENSE file', () { | 36 integration('has a suffixed LICENSE file', () { |
37 schedule(() => deleteEntry(path.join(sandboxDir, appPath, 'LICENSE'))); | 37 schedule(() => deleteEntry(path.join(sandboxDir, appPath, 'LICENSE'))); |
38 d.file(path.join(appPath, 'LICENSE.md'), '').create(); | 38 d.file(path.join(appPath, 'LICENSE.md'), '').create(); |
39 expectNoValidationError(license); | 39 expectNoValidationError(license); |
40 }); | 40 }); |
41 }); | 41 }); |
42 | 42 |
43 integration('should consider a package invalid if it has no LICENSE file', | 43 group('should consider a package invalid if it', () { |
44 () { | 44 integration('has no LICENSE file', () { |
45 d.validPackage.create(); | 45 d.validPackage.create(); |
46 schedule(() => deleteEntry(path.join(sandboxDir, appPath, 'LICENSE'))); | 46 schedule(() => deleteEntry(path.join(sandboxDir, appPath, 'LICENSE'))); |
47 expectValidationError(license); | 47 expectValidationError(license); |
| 48 }); |
| 49 |
| 50 integration('has a .gitignored LICENSE file', () { |
| 51 var repo = d.git(appPath, [d.file(".gitignore", "LICENSE")]); |
| 52 d.validPackage.create(); |
| 53 repo.create(); |
| 54 expectValidationError(license); |
| 55 }); |
48 }); | 56 }); |
49 } | 57 } |
OLD | NEW |