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

Unified Diff: lib/src/util/io.dart

Issue 1649663003: Add basic support for a configuration file. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 11 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
Index: lib/src/util/io.dart
diff --git a/lib/src/util/io.dart b/lib/src/util/io.dart
index 4a9f6a82de32f669893b0ad9066962297d7eb712..ab408b60d1921375e8350fece81e184b4630edca 100644
--- a/lib/src/util/io.dart
+++ b/lib/src/util/io.dart
@@ -42,6 +42,9 @@ final OperatingSystem currentOS = (() {
final stdinLines = new StreamQueue(
UTF8.decoder.fuse(const LineSplitter()).bind(stdin));
+/// Whether this is being run as a subprocess in the test package's own tests.
+bool inTestTests = Platform.environment["_DART_TEST_TESTING"] == "true";
+
/// The root directory below which to nest temporary directories created by the
/// test runner.
///
@@ -64,8 +67,7 @@ String libDir({String packageRoot}) {
/// On Windows or when not printing to a terminal, only printable ASCII
/// characters should be used.
bool get canUseSpecialChars =>
- Platform.operatingSystem != 'windows' &&
- Platform.environment["_UNITTEST_USE_COLOR"] != "false";
+ Platform.operatingSystem != 'windows' && !inTestTests;
/// Creates a temporary directory and returns its path.
String createTempDir() =>

Powered by Google App Engine
This is Rietveld 408576698