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

Unified Diff: pkg/analyzer_cli/test/package_prefix_test.dart

Issue 1844613002: Fix for analyzer_cli/test/package_prefix_test on Windows. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/test/package_prefix_test.dart
diff --git a/pkg/analyzer_cli/test/package_prefix_test.dart b/pkg/analyzer_cli/test/package_prefix_test.dart
index 1ba203f995b3f5071020b112b7770f7ed0c9d100..22d71e1fd8a8510f888f4c0f3ad7df42016ffc7d 100644
--- a/pkg/analyzer_cli/test/package_prefix_test.dart
+++ b/pkg/analyzer_cli/test/package_prefix_test.dart
@@ -2,6 +2,7 @@ import 'dart:io' show exitCode;
import 'package:analyzer_cli/src/driver.dart' show Driver, outSink, errorSink;
import 'package:analyzer_cli/src/options.dart' show ExitHandler, exitHandler;
+import 'package:path/path.dart';
import 'package:unittest/unittest.dart';
import 'utils.dart' show testDirectory;
@@ -22,14 +23,14 @@ main() {
test('shows only the hint whose package matches the prefix', () {
runner.run([
"--packages",
- "$testDirectory/data/package_prefix/packagelist",
+ join(testDirectory, 'data', 'package_prefix', 'packagelist'),
"--x-package-warnings-prefix=f",
- "$testDirectory/data/package_prefix/main.dart"
+ join(testDirectory, 'data', 'package_prefix', 'main.dart')
]);
- print("ran it");
expect(runner.stdout, contains('1 hint found'));
expect(runner.stdout, contains('Unused import'));
- expect(runner.stdout, contains('package_prefix/pkg/foo/foo.dart'));
+ expect(runner.stdout,
+ contains(join('package_prefix', 'pkg', 'foo', 'foo.dart')));
expect(runner.stdout, isNot(contains('bar.dart')));
});
});
@@ -54,6 +55,9 @@ class _Runner {
exitHandler = (_) {};
}
+ String get stderr => _stderr.toString();
+
+ String get stdout => _stdout.toString();
void run(List<String> args) {
new Driver().start(args);
if (stderr.isNotEmpty) {
@@ -61,9 +65,6 @@ class _Runner {
}
}
- String get stdout => _stdout.toString();
- String get stderr => _stderr.toString();
-
void tearDown() {
outSink = _savedOutSink;
errorSink = _savedErrorSink;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698