Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: test/preprocess_test.dart

Issue 1215833002: Use the new test runner. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/src/preprocess.dart';
8 import 'package:pub_semver/pub_semver.dart'; 8 import 'package:pub_semver/pub_semver.dart';
9 import 'package:unittest/unittest.dart'; 9 import 'package:test/test.dart';
10 10
11 import 'test_pub.dart'; 11 import 'test_pub.dart';
12 12
13 main() { 13 main() {
14 initConfig();
15
16 test("does nothing on a file without preprocessor directives", () { 14 test("does nothing on a file without preprocessor directives", () {
17 var text = ''' 15 var text = '''
18 some text 16 some text
19 // normal comment 17 // normal comment
20 // # 18 // #
21 //# not beginning of line 19 //# not beginning of line
22 '''; 20 ''';
23 21
24 expect(_preprocess(text), equals(text)); 22 expect(_preprocess(text), equals(text));
25 }); 23 });
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 //# else barback <0.5.0 292 //# else barback <0.5.0
295 //# end 293 //# end
296 '''), throwsFormatException); 294 '''), throwsFormatException);
297 }); 295 });
298 }); 296 });
299 }); 297 });
300 } 298 }
301 299
302 String _preprocess(String input) => 300 String _preprocess(String input) =>
303 preprocess(input, {'barback': new Version.parse("1.2.3")}, 'source/url'); 301 preprocess(input, {'barback': new Version.parse("1.2.3")}, 'source/url');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698