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

Side by Side Diff: test/validator/license_test.dart

Issue 1310253007: Make pub lish validation gitignore-aware. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: analysis hints Created 5 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
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698