OLD | NEW |
| (Empty) |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | |
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. | |
4 | |
5 import 'package:path/path.dart' as p; | |
6 | |
7 import '../descriptor.dart' as d; | |
8 import '../test_pub.dart'; | |
9 | |
10 const SCRIPT = """ | |
11 import 'dart:io'; | |
12 | |
13 main() { | |
14 stdout.writeln("stdout output"); | |
15 stderr.writeln("stderr output"); | |
16 exitCode = 123; | |
17 } | |
18 """; | |
19 | |
20 main() { | |
21 initConfig(); | |
22 integration('runs a Dart application in the entrypoint package', () { | |
23 d.dir(appPath, [ | |
24 d.appPubspec(), | |
25 d.dir("bin", [ | |
26 d.file("script.dart", SCRIPT) | |
27 ]) | |
28 ]).create(); | |
29 | |
30 var pub = pubRun(args: ["script"]); | |
31 pub.stdout.expect("stdout output"); | |
32 pub.stderr.expect( | |
33 'In future releases, "pub run script" will mean the same thing as "pub ' | |
34 'run script:script".'); | |
35 pub.stderr.expect( | |
36 'Run "pub run ${p.join('bin', 'script')}" explicitly to run the local ' | |
37 'executable.'); | |
38 pub.stderr.expect("stderr output"); | |
39 pub.shouldExit(123); | |
40 }); | |
41 } | |
OLD | NEW |