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 |
(...skipping 18 matching lines...) Expand all Loading... |
29 transform.addOutput(asset); | 29 transform.addOutput(asset); |
30 }); | 30 }); |
31 } | 31 } |
32 } | 32 } |
33 """; | 33 """; |
34 | 34 |
35 main() { | 35 main() { |
36 initConfig(); | 36 initConfig(); |
37 withBarbackVersions("any", () { | 37 withBarbackVersions("any", () { |
38 integration("a transform can use hasInput", () { | 38 integration("a transform can use hasInput", () { |
39 d.dir(appPath, [ | 39 d.dir(appPath, [d.pubspec({ |
40 d.pubspec({ | |
41 "name": "myapp", | 40 "name": "myapp", |
42 "transformers": ["myapp/src/transformer"] | 41 "transformers": ["myapp/src/transformer"] |
43 }), | 42 }), |
44 d.dir("lib", [d.dir("src", [ | 43 d.dir("lib", [d.dir("src", [d.file("transformer.dart", TRANSFORMER)]
)]), |
45 d.file("transformer.dart", TRANSFORMER) | 44 d.dir("web", [d.file("foo.txt", "foo")])]).create(); |
46 ])]), | |
47 d.dir("web", [ | |
48 d.file("foo.txt", "foo") | |
49 ]) | |
50 ]).create(); | |
51 | 45 |
52 createLockFile('myapp', pkg: ['barback']); | 46 createLockFile('myapp', pkg: ['barback']); |
53 | 47 |
54 pubServe(); | 48 pubServe(); |
55 requestShouldSucceed("foo.out", "primary: true, secondary: false"); | 49 requestShouldSucceed("foo.out", "primary: true, secondary: false"); |
56 endPubServe(); | 50 endPubServe(); |
57 }); | 51 }); |
58 }); | 52 }); |
59 } | 53 } |
OLD | NEW |