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 'dart:io'; | 5 import 'dart:io'; |
6 | 6 |
7 import 'package:path/path.dart' as path; | 7 import 'package:path/path.dart' as path; |
8 import 'package:scheduled_test/descriptor.dart' as d; | 8 import 'package:scheduled_test/descriptor.dart' as d; |
9 import 'package:scheduled_test/scheduled_test.dart'; | 9 import 'package:scheduled_test/scheduled_test.dart'; |
10 | 10 |
11 import 'package:metatest/metatest.dart'; | |
12 import 'utils.dart'; | 11 import 'utils.dart'; |
13 | 12 |
14 void main() { | 13 void main() { |
15 expectTestPasses("nothing().create() does nothing", () { | 14 expectTestPasses("nothing().create() does nothing", () { |
16 scheduleSandbox(); | 15 scheduleSandbox(); |
17 | 16 |
18 d.nothing('foo').create(); | 17 d.nothing('foo').create(); |
19 | 18 |
20 schedule(() { | 19 schedule(() { |
21 expect(new File(path.join(sandbox, 'foo')).exists(), | 20 expect(new File(path.join(sandbox, 'foo')).exists(), |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 schedule(() { | 58 schedule(() { |
60 new Link(path.join(sandbox, 'link')).createSync('nonexistent'); | 59 new Link(path.join(sandbox, 'link')).createSync('nonexistent'); |
61 }); | 60 }); |
62 d.nothing('link').validate(); | 61 d.nothing('link').validate(); |
63 }, (error) { | 62 }, (error) { |
64 expect(error.toString(), | 63 expect(error.toString(), |
65 matches(r"^Expected nothing to exist at '[^']+[\\/]link', but found " | 64 matches(r"^Expected nothing to exist at '[^']+[\\/]link', but found " |
66 r"a link\.$")); | 65 r"a link\.$")); |
67 }); | 66 }); |
68 } | 67 } |
OLD | NEW |