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 pub_tests; | 5 library pub_tests; |
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_process.dart'; | 10 import 'package:scheduled_test/scheduled_process.dart'; |
(...skipping 15 matching lines...) Expand all Loading... |
26 // | 26 // |
27 // Note that this test expects to be invoked from a Dart executable that is | 27 // Note that this test expects to be invoked from a Dart executable that is |
28 // in the built SDK's "bin" directory. Note also that this invokes pub from | 28 // in the built SDK's "bin" directory. Note also that this invokes pub from |
29 // the built SDK directory, and not the live pub code directly in the repo. | 29 // the built SDK directory, and not the live pub code directly in the repo. |
30 integration('parse the real SDK "version" file', () { | 30 integration('parse the real SDK "version" file', () { |
31 // Get the path to the pub binary in the SDK. | 31 // Get the path to the pub binary in the SDK. |
32 var pubPath = path.join(sdk.rootDirectory, 'bin', | 32 var pubPath = path.join(sdk.rootDirectory, 'bin', |
33 Platform.operatingSystem == "windows" ? "pub.bat" : "pub"); | 33 Platform.operatingSystem == "windows" ? "pub.bat" : "pub"); |
34 | 34 |
35 var pub = new ScheduledProcess.start(pubPath, ['version']); | 35 var pub = new ScheduledProcess.start(pubPath, ['version']); |
36 expect(pub.nextLine(), completion(startsWith("Pub"))); | 36 pub.stdout.expect(startsWith("Pub")); |
37 pub.shouldExit(exit_codes.SUCCESS); | 37 pub.shouldExit(exit_codes.SUCCESS); |
38 }); | 38 }); |
39 } | 39 } |
OLD | NEW |