| 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.test.preprocess_test; | 5 library pub.test.preprocess_test; |
| 6 | 6 |
| 7 import 'package:pub/src/preprocess.dart'; |
| 7 import 'package:pub_semver/pub_semver.dart'; | 8 import 'package:pub_semver/pub_semver.dart'; |
| 8 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
| 9 | 10 |
| 10 import '../lib/src/preprocess.dart'; | |
| 11 import 'test_pub.dart'; | 11 import 'test_pub.dart'; |
| 12 | 12 |
| 13 main() { | 13 main() { |
| 14 initConfig(); | 14 initConfig(); |
| 15 | 15 |
| 16 test("does nothing on a file without preprocessor directives", () { | 16 test("does nothing on a file without preprocessor directives", () { |
| 17 var text = ''' | 17 var text = ''' |
| 18 some text | 18 some text |
| 19 // normal comment | 19 // normal comment |
| 20 // # | 20 // # |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 //# else barback <0.5.0 | 294 //# else barback <0.5.0 |
| 295 //# end | 295 //# end |
| 296 '''), throwsFormatException); | 296 '''), throwsFormatException); |
| 297 }); | 297 }); |
| 298 }); | 298 }); |
| 299 }); | 299 }); |
| 300 } | 300 } |
| 301 | 301 |
| 302 String _preprocess(String input) => | 302 String _preprocess(String input) => |
| 303 preprocess(input, {'barback': new Version.parse("1.2.3")}, 'source/url'); | 303 preprocess(input, {'barback': new Version.parse("1.2.3")}, 'source/url'); |
| OLD | NEW |