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

Unified Diff: sdk/lib/_internal/pub/test/command_line_config.dart

Issue 14914007: Add a "pub deploy" command. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 7 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: sdk/lib/_internal/pub/test/command_line_config.dart
diff --git a/sdk/lib/_internal/pub/test/command_line_config.dart b/sdk/lib/_internal/pub/test/command_line_config.dart
index 8a929e46c4f402e667fcc8d7b4e6694aae032c42..ed55aff16ff4eefe459e1dd10240f9703a9432d1 100644
--- a/sdk/lib/_internal/pub/test/command_line_config.dart
+++ b/sdk/lib/_internal/pub/test/command_line_config.dart
@@ -11,23 +11,15 @@ import 'package:pathos/path.dart' as path;
import 'package:unittest/unittest.dart';
import '../lib/src/utils.dart';
-/// Gets a "special" string (ANSI escape or Unicode). On Windows, returns
-/// something else since those aren't supported.
-String _getSpecial(String color, [String onWindows = '']) {
- // No ANSI escapes on windows.
- if (Platform.operatingSystem == 'windows') return onWindows;
- return color;
-}
-
/// Pretty Unicode characters!
-final _checkbox = _getSpecial('\u2713', 'PASS');
-final _ballotX = _getSpecial('\u2717', 'FAIL');
-final _lambda = _getSpecial('\u03bb', '<fn>');
-
-final _green = _getSpecial('\u001b[32m');
-final _red = _getSpecial('\u001b[31m');
-final _magenta = _getSpecial('\u001b[35m');
-final _none = _getSpecial('\u001b[0m');
+final _checkbox = getSpecial('\u2713', 'PASS');
+final _ballotX = getSpecial('\u2717', 'FAIL');
+final _lambda = getSpecial('\u03bb', '<fn>');
+
+final _green = getSpecial('\u001b[32m');
+final _red = getSpecial('\u001b[31m');
+final _magenta = getSpecial('\u001b[35m');
+final _none = getSpecial('\u001b[0m');
/// A custom unittest configuration for running the pub tests from the
/// command-line and generating human-friendly output.

Powered by Google App Engine
This is Rietveld 408576698