Index: tests/standalone/from_environment_bool_script.dart |
diff --git a/tests/standalone/from_environment_bool_script.dart b/tests/standalone/from_environment_bool_script.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dab61c464fd74f3bf0c02c17e086bf9aec5419de |
--- /dev/null |
+++ b/tests/standalone/from_environment_bool_script.dart |
@@ -0,0 +1,14 @@ |
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+import "dart:convert"; |
+import "dart:io"; |
+ |
+main(List<String> args) { |
+ var result = new Map(); |
+ result['a'] = const bool.fromEnvironment('a', defaultValue: null); |
+ result['b'] = const bool.fromEnvironment('b'); |
+ result['c'] = const bool.fromEnvironment('c', defaultValue: true); |
+ stdout.write(JSON.encode(result)); |
+} |