| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.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 '../../descriptor.dart' as d; | 7 import '../../descriptor.dart' as d; |
| 8 import '../../test_pub.dart'; | 8 import '../../test_pub.dart'; |
| 9 import '../../serve/utils.dart'; | 9 import '../../serve/utils.dart'; |
| 10 | 10 |
| 11 main() { | 11 main() { |
| 12 withBarbackVersions("any", () { | 12 integration("excludes a list of assets", () { |
| 13 integration("excludes a list of assets", () { | 13 d.dir(appPath, [ |
| 14 d.dir(appPath, [ | 14 d.pubspec({ |
| 15 d.pubspec({ | 15 "name": "myapp", |
| 16 "name": "myapp", | 16 "transformers": [ |
| 17 "transformers": [ | 17 { |
| 18 { | 18 "myapp/src/transformer": { |
| 19 "myapp/src/transformer": { | 19 "\$exclude": [ |
| 20 "\$exclude": [ | 20 "web/foo.txt", |
| 21 "web/foo.txt", | 21 "web/sub/foo.txt" |
| 22 "web/sub/foo.txt" | 22 ] |
| 23 ] | |
| 24 } | |
| 25 } | 23 } |
| 26 ] | 24 } |
| 27 }), | 25 ] |
| 28 d.dir("lib", [d.dir("src", [ | 26 }), |
| 29 d.file("transformer.dart", REWRITE_TRANSFORMER) | 27 d.dir("lib", [d.dir("src", [ |
| 30 ])]), | 28 d.file("transformer.dart", REWRITE_TRANSFORMER) |
| 31 d.dir("web", [ | 29 ])]), |
| 30 d.dir("web", [ |
| 31 d.file("foo.txt", "foo"), |
| 32 d.file("bar.txt", "bar"), |
| 33 d.dir("sub", [ |
| 32 d.file("foo.txt", "foo"), | 34 d.file("foo.txt", "foo"), |
| 33 d.file("bar.txt", "bar"), | |
| 34 d.dir("sub", [ | |
| 35 d.file("foo.txt", "foo"), | |
| 36 ]) | |
| 37 ]) | 35 ]) |
| 38 ]).create(); | 36 ]) |
| 37 ]).create(); |
| 39 | 38 |
| 40 createLockFile('myapp', pkg: ['barback']); | 39 createLockFile('myapp', pkg: ['barback']); |
| 41 | 40 |
| 42 pubServe(); | 41 pubServe(); |
| 43 requestShould404("foo.out"); | 42 requestShould404("foo.out"); |
| 44 requestShould404("sub/foo.out"); | 43 requestShould404("sub/foo.out"); |
| 45 requestShouldSucceed("bar.out", "bar.out"); | 44 requestShouldSucceed("bar.out", "bar.out"); |
| 46 endPubServe(); | 45 endPubServe(); |
| 47 }); | |
| 48 }); | 46 }); |
| 49 } | 47 } |
| OLD | NEW |