| 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:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 | 10 |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 | 377 |
| 378 void main() { | 378 void main() { |
| 379 $script | 379 $script |
| 380 } | 380 } |
| 381 ''').then((file) => file.path); | 381 ''').then((file) => file.path); |
| 382 }); | 382 }); |
| 383 }, 'write script file'); | 383 }, 'write script file'); |
| 384 | 384 |
| 385 currentSchedule.onComplete.schedule(() { | 385 currentSchedule.onComplete.schedule(() { |
| 386 return tempDir.catchError((_) => null).then((dir) { | 386 return tempDir.catchError((_) => null).then((dir) { |
| 387 if (dir == null) return; | 387 if (dir == null) return null; |
| 388 return new Directory(dir).delete(recursive: true); | 388 return new Directory(dir).delete(recursive: true); |
| 389 }); | 389 }); |
| 390 }, 'clean up temp dir'); | 390 }, 'clean up temp dir'); |
| 391 | 391 |
| 392 return new ScheduledProcess.start(Platform.executable, | 392 return new ScheduledProcess.start(Platform.executable, |
| 393 ['--checked', dartPath]); | 393 ['--checked', dartPath]); |
| 394 } | 394 } |
| OLD | NEW |