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 '../descriptor.dart' as d; |
| 6 import '../test_pub.dart'; |
| 7 |
| 8 main() { |
| 9 initConfig(); |
| 10 |
| 11 integration("if a dir name is given, only includes that dir", () { |
| 12 d.dir(appPath, [ |
| 13 d.appPubspec(), |
| 14 d.dir('asset', [ |
| 15 d.file('file.txt', 'asset') |
| 16 ]), |
| 17 d.dir('example', [ |
| 18 d.file('file.txt', 'example') |
| 19 ]), |
| 20 d.dir('web', [ |
| 21 d.file('file.txt', 'test') |
| 22 ]) |
| 23 ]).create(); |
| 24 |
| 25 schedulePub(args: ["build", "example"], |
| 26 output: new RegExp(r"Built 2 files!")); |
| 27 |
| 28 d.dir(appPath, [ |
| 29 d.dir('build', [ |
| 30 d.dir('example', [ |
| 31 d.file('file.txt', 'example'), |
| 32 d.dir('assets', [ |
| 33 d.dir('myapp', [ |
| 34 d.file('file.txt', 'asset') |
| 35 ]) |
| 36 ]) |
| 37 ]), |
| 38 // Only example should be built. |
| 39 d.nothing('web') |
| 40 ]) |
| 41 ]).validate(); |
| 42 }); |
| 43 } |
OLD | NEW |