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 library scheduled_process_test; | 5 library scheduled_process_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import '../../../pkg/pathos/lib/path.dart' as path; | 10 import '../../../pkg/pathos/lib/path.dart' as path; |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 void main() { | 376 void main() { |
377 $script | 377 $script |
378 } | 378 } |
379 ''').then((file) => file.path); | 379 ''').then((file) => file.path); |
380 }); | 380 }); |
381 }, 'write script file'); | 381 }, 'write script file'); |
382 | 382 |
383 currentSchedule.onComplete.schedule(() { | 383 currentSchedule.onComplete.schedule(() { |
384 return tempDir.catchError((_) => null).then((dir) { | 384 return tempDir.catchError((_) => null).then((dir) { |
385 if (dir == null) return; | 385 if (dir == null) return; |
386 return deleteDir(dir); | 386 return new Directory(dir).delete(recursive: true); |
387 }); | 387 }); |
388 }, 'clean up temp dir'); | 388 }, 'clean up temp dir'); |
389 | 389 |
390 return new ScheduledProcess.start(dartExecutable, ['--checked', dartPath]); | 390 return new ScheduledProcess.start(dartExecutable, ['--checked', dartPath]); |
391 } | 391 } |
OLD | NEW |