| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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 'package:path/path.dart' as p; | 7 import 'package:path/path.dart' as p; |
| 8 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
| 9 import 'package:scheduled_test/scheduled_stream.dart'; | 9 import 'package:scheduled_test/scheduled_stream.dart'; |
| 10 | 10 |
| 11 import '../descriptor.dart' as d; | 11 import '../descriptor.dart' as d; |
| 12 import '../test_pub.dart'; | 12 import '../test_pub.dart'; |
| 13 | 13 |
| 14 main() { | 14 main() { |
| 15 initConfig(); | |
| 16 integration("creates a snapshot for an immediate dependency's executables", | 15 integration("creates a snapshot for an immediate dependency's executables", |
| 17 () { | 16 () { |
| 18 servePackages((builder) { | 17 servePackages((builder) { |
| 19 builder.serve("foo", "5.6.7", contents: [ | 18 builder.serve("foo", "5.6.7", contents: [ |
| 20 d.dir("bin", [d.file("hello.dart", "void main() => print('hello!');")]) | 19 d.dir("bin", [d.file("hello.dart", "void main() => print('hello!');")]) |
| 21 ]); | 20 ]); |
| 22 }); | 21 }); |
| 23 | 22 |
| 24 d.appDir({"foo": "5.6.7"}).create(); | 23 d.appDir({"foo": "5.6.7"}).create(); |
| 25 | 24 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 36 process.stdout.expect("Precompiling executables..."); | 35 process.stdout.expect("Precompiling executables..."); |
| 37 process.stdout.expect(consumeThrough("hello!")); | 36 process.stdout.expect(consumeThrough("hello!")); |
| 38 process.shouldExit(); | 37 process.shouldExit(); |
| 39 | 38 |
| 40 d.dir(p.join(appPath, '.pub', 'bin'), [ | 39 d.dir(p.join(appPath, '.pub', 'bin'), [ |
| 41 d.file('sdk-version', '0.1.2+3'), | 40 d.file('sdk-version', '0.1.2+3'), |
| 42 d.dir('foo', [d.matcherFile('hello.dart.snapshot', contains('hello!'))]) | 41 d.dir('foo', [d.matcherFile('hello.dart.snapshot', contains('hello!'))]) |
| 43 ]).create(); | 42 ]).create(); |
| 44 }); | 43 }); |
| 45 } | 44 } |
| OLD | NEW |