OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library lock_file_test; | 5 library lock_file_test; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
9 import 'package:path/path.dart' as path; | 9 import 'package:path/path.dart' as path; |
10 import 'package:scheduled_test/scheduled_test.dart'; | 10 import 'package:scheduled_test/scheduled_test.dart'; |
11 | 11 |
12 import '../lib/src/entrypoint.dart'; | 12 import '../lib/src/entrypoint.dart'; |
13 import '../lib/src/io.dart'; | 13 import '../lib/src/io.dart'; |
14 import '../lib/src/system_cache.dart'; | 14 import '../lib/src/system_cache.dart'; |
15 import 'descriptor.dart' as d; | 15 import 'descriptor.dart' as d; |
16 import 'test_pub.dart'; | 16 import 'test_pub.dart'; |
17 | 17 |
18 var root; | 18 var root; |
19 var entrypoint; | 19 var entrypoint; |
20 | 20 |
21 main() { | 21 main() { |
22 initConfig(); | 22 initConfig(); |
23 | 23 |
24 group('not in a git repo', () { | 24 group('not in a git repo', () { |
25 setUp(() { | 25 setUp(() { |
26 d.appDir([]).create(); | 26 d.appDir().create(); |
27 scheduleEntrypoint(); | 27 scheduleEntrypoint(); |
28 }); | 28 }); |
29 | 29 |
30 | 30 |
31 integration('lists files recursively', () { | 31 integration('lists files recursively', () { |
32 d.dir(appPath, [ | 32 d.dir(appPath, [ |
33 d.file('file1.txt', 'contents'), | 33 d.file('file1.txt', 'contents'), |
34 d.file('file2.txt', 'contents'), | 34 d.file('file2.txt', 'contents'), |
35 d.dir('subdir', [ | 35 d.dir('subdir', [ |
36 d.file('subfile1.txt', 'subcontents'), | 36 d.file('subfile1.txt', 'subcontents'), |
(...skipping 11 matching lines...) Expand all Loading... |
48 ]))); | 48 ]))); |
49 }); | 49 }); |
50 }); | 50 }); |
51 | 51 |
52 commonTests(); | 52 commonTests(); |
53 }); | 53 }); |
54 | 54 |
55 group('with git', () { | 55 group('with git', () { |
56 setUp(() { | 56 setUp(() { |
57 ensureGit(); | 57 ensureGit(); |
58 d.git(appPath, [d.appPubspec([])]).create(); | 58 d.git(appPath, [d.appPubspec()]).create(); |
59 scheduleEntrypoint(); | 59 scheduleEntrypoint(); |
60 }); | 60 }); |
61 | 61 |
62 integration("includes files that are or aren't checked in", () { | 62 integration("includes files that are or aren't checked in", () { |
63 d.dir(appPath, [ | 63 d.dir(appPath, [ |
64 d.file('file1.txt', 'contents'), | 64 d.file('file1.txt', 'contents'), |
65 d.file('file2.txt', 'contents'), | 65 d.file('file2.txt', 'contents'), |
66 d.dir('subdir', [ | 66 d.dir('subdir', [ |
67 d.file('subfile1.txt', 'subcontents'), | 67 d.file('subfile1.txt', 'subcontents'), |
68 d.file('subfile2.txt', 'subcontents') | 68 d.file('subfile2.txt', 'subcontents') |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 completion(unorderedEquals([ | 215 completion(unorderedEquals([ |
216 path.join(root, 'packages', 'subfile1.txt'), | 216 path.join(root, 'packages', 'subfile1.txt'), |
217 path.join(root, 'packages', 'subfile2.txt'), | 217 path.join(root, 'packages', 'subfile2.txt'), |
218 path.join(root, 'packages', 'subsubdir', 'subsubfile1.txt'), | 218 path.join(root, 'packages', 'subsubdir', 'subsubfile1.txt'), |
219 path.join(root, 'packages', 'subsubdir', 'subsubfile2.txt') | 219 path.join(root, 'packages', 'subsubdir', 'subsubfile2.txt') |
220 ]))); | 220 ]))); |
221 }); | 221 }); |
222 }); | 222 }); |
223 }); | 223 }); |
224 } | 224 } |
OLD | NEW |