| 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("allows a glob to include", () { |
| 13 integration("allows a glob to include", () { | 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 "\$include": "**/foo.txt" |
| 20 "\$include": "**/foo.txt" | |
| 21 } | |
| 22 } | 20 } |
| 23 ] | 21 } |
| 24 }), | 22 ] |
| 25 d.dir("lib", [d.dir("src", [ | 23 }), |
| 26 d.file("transformer.dart", REWRITE_TRANSFORMER) | 24 d.dir("lib", [d.dir("src", [ |
| 27 ])]), | 25 d.file("transformer.dart", REWRITE_TRANSFORMER) |
| 28 d.dir("web", [ | 26 ])]), |
| 27 d.dir("web", [ |
| 28 d.file("foo.txt", "foo"), |
| 29 d.file("bar.txt", "bar"), |
| 30 d.dir("sub", [ |
| 29 d.file("foo.txt", "foo"), | 31 d.file("foo.txt", "foo"), |
| 30 d.file("bar.txt", "bar"), | |
| 31 d.dir("sub", [ | |
| 32 d.file("foo.txt", "foo"), | |
| 33 ]) | |
| 34 ]) | 32 ]) |
| 35 ]).create(); | 33 ]) |
| 34 ]).create(); |
| 36 | 35 |
| 37 createLockFile('myapp', pkg: ['barback']); | 36 createLockFile('myapp', pkg: ['barback']); |
| 38 | 37 |
| 39 pubServe(); | 38 pubServe(); |
| 40 requestShouldSucceed("foo.out", "foo.out"); | 39 requestShouldSucceed("foo.out", "foo.out"); |
| 41 requestShould404("bar.out"); | 40 requestShould404("bar.out"); |
| 42 requestShouldSucceed("sub/foo.out", "foo.out"); | 41 requestShouldSucceed("sub/foo.out", "foo.out"); |
| 43 endPubServe(); | 42 endPubServe(); |
| 44 }); | |
| 45 }); | 43 }); |
| 46 } | 44 } |
| OLD | NEW |