OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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 'utils.dart'; | 9 import 'utils.dart'; |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 "name": "foo", | 81 "name": "foo", |
82 "version": "1.0.0", | 82 "version": "1.0.0", |
83 "transformers": [{"foo": {"\$include": "bin/foo.dart"}}] | 83 "transformers": [{"foo": {"\$include": "bin/foo.dart"}}] |
84 }), | 84 }), |
85 d.dir("lib", [d.file("foo.dart", transformer())]), | 85 d.dir("lib", [d.file("foo.dart", transformer())]), |
86 d.dir("test", [d.file("foo_test.dart", "")]) | 86 d.dir("test", [d.file("foo_test.dart", "")]) |
87 ]).create(); | 87 ]).create(); |
88 | 88 |
89 expectDependencies({"foo": []}); | 89 expectDependencies({"foo": []}); |
90 }); | 90 }); |
| 91 |
| 92 // Regression test for #1291 |
| 93 integration("doesn't return a dependency's transformer that can't run on lib " |
| 94 "when the app's transformer imports the dependency's", () { |
| 95 d.dir(appPath, [ |
| 96 d.pubspec({ |
| 97 "name": "myapp", |
| 98 "dependencies": {"foo": {"path": "../foo"}}, |
| 99 "transformers": ["myapp"] |
| 100 }), |
| 101 d.dir("lib", [ |
| 102 d.file("myapp.dart", transformer(['package:foo/foo.dart'])) |
| 103 ]) |
| 104 ]).create(); |
| 105 |
| 106 d.dir("foo", [ |
| 107 d.pubspec({ |
| 108 "name": "foo", |
| 109 "version": "1.0.0", |
| 110 "transformers": [ |
| 111 ["foo/bar"], |
| 112 [{"foo": {"\$include": "test/foo_test.dart"}}] |
| 113 ] |
| 114 }), |
| 115 d.dir("lib", [ |
| 116 d.file("foo.dart", transformer()), |
| 117 d.file("bar.dart", transformer()) |
| 118 ]), |
| 119 d.dir("test", [d.file("foo_test.dart", "")]) |
| 120 ]).create(); |
| 121 |
| 122 expectDependencies({ |
| 123 'foo/bar': [], |
| 124 'myapp': ['foo/bar'] |
| 125 }); |
| 126 }); |
91 } | 127 } |
OLD | NEW |