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 import '../descriptor.dart' as d; | 5 import '../descriptor.dart' as d; |
6 import '../test_pub.dart'; | 6 import '../test_pub.dart'; |
7 import '../serve/utils.dart'; | |
8 | 7 |
9 const TRANSFORMER = """ | 8 const TRANSFORMER = """ |
10 import 'dart:async'; | 9 import 'dart:async'; |
11 | 10 |
12 import 'package:barback/barback.dart'; | 11 import 'package:barback/barback.dart'; |
13 | 12 |
14 class BrokenTransformer extends Transformer { | 13 class BrokenTransformer extends Transformer { |
15 RewriteTransformer.asPlugin() { | 14 RewriteTransformer.asPlugin() { |
16 throw 'This transformer is broken!'; | 15 throw 'This transformer is broken!'; |
17 } | 16 } |
(...skipping 28 matching lines...) Expand all Loading... |
46 pubGet(); | 45 pubGet(); |
47 | 46 |
48 // This shouldn't load the transformer, since it doesn't transform | 47 // This shouldn't load the transformer, since it doesn't transform |
49 // anything that the entrypoint imports. If it did load the transformer, | 48 // anything that the entrypoint imports. If it did load the transformer, |
50 // we'd know since it would throw an exception. | 49 // we'd know since it would throw an exception. |
51 var pub = pubRun(args: ["bin/hi"]); | 50 var pub = pubRun(args: ["bin/hi"]); |
52 pub.stdout.expect("Hello!"); | 51 pub.stdout.expect("Hello!"); |
53 pub.shouldExit(); | 52 pub.shouldExit(); |
54 }); | 53 }); |
55 } | 54 } |
OLD | NEW |