OLD | NEW |
(Empty) | |
| 1 library pub_tests; |
| 2 import 'package:path/path.dart' as p; |
| 3 import 'package:scheduled_test/scheduled_test.dart'; |
| 4 import '../descriptor.dart' as d; |
| 5 import '../test_pub.dart'; |
| 6 main() { |
| 7 initConfig(); |
| 8 integration("prints errors for broken snapshot compilation", () { |
| 9 servePackages((builder) { |
| 10 builder.serve( |
| 11 "foo", |
| 12 "1.2.3", |
| 13 contents: [ |
| 14 d.dir( |
| 15 "bin", |
| 16 [ |
| 17 d.file("hello.dart", "void main() { no closing brace"), |
| 18 d.file("goodbye.dart", "void main() { no closing brace")])
]); |
| 19 builder.serve( |
| 20 "bar", |
| 21 "1.2.3", |
| 22 contents: [ |
| 23 d.dir( |
| 24 "bin", |
| 25 [ |
| 26 d.file("hello.dart", "void main() { no closing brace"), |
| 27 d.file("goodbye.dart", "void main() { no closing brace")])
]); |
| 28 }); |
| 29 d.appDir({ |
| 30 "foo": "1.2.3", |
| 31 "bar": "1.2.3" |
| 32 }).create(); |
| 33 pubGet( |
| 34 error: allOf( |
| 35 [ |
| 36 contains("Failed to precompile foo:hello"), |
| 37 contains("Failed to precompile foo:goodbye"), |
| 38 contains("Failed to precompile bar:hello"), |
| 39 contains("Failed to precompile bar:goodbye")]), |
| 40 exitCode: 0); |
| 41 d.dir( |
| 42 p.join(appPath, '.pub', 'bin'), |
| 43 [ |
| 44 d.file('sdk-version', '0.1.2+3\n'), |
| 45 d.dir( |
| 46 'foo', |
| 47 [d.nothing('hello.dart.snapshot'), d.nothing('goodbye.dart.snaps
hot')]), |
| 48 d.dir( |
| 49 'bar', |
| 50 [ |
| 51 d.nothing('hello.dart.snapshot'), |
| 52 d.nothing('goodbye.dart.snapshot')])]).validate(); |
| 53 }); |
| 54 } |
OLD | NEW |