mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 09:01:42 +00:00
848121e6d4
- Added support for --define to the VM and dart2js
- Added support for -D and --define for `dart run` and `dart compile js`
Remaining improvements:
- Add support for providing multiple comma separated values for `dart
run`, `dart`, and `dart2js`
Related issue: https://github.com/dart-lang/sdk/issues/44562
TEST=Updated CLI tests and added new dart2js tests.
This reverts commit e49937769f
.
Change-Id: I5f9275b829665eb5e8695403d67f230e752ab0e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183180
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
15 lines
615 B
Dart
15 lines
615 B
Dart
// 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.
|
|
// SharedOptions=-Da=a -Db=bb -Dc=ccc -Dd= --define=e=eeee
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
main() {
|
|
Expect.equals('a', const String.fromEnvironment('a'));
|
|
Expect.equals('bb', const String.fromEnvironment('b'));
|
|
Expect.equals('ccc', const String.fromEnvironment('c'));
|
|
Expect.equals('', const String.fromEnvironment('d'));
|
|
Expect.equals('eeee', const String.fromEnvironment('e'));
|
|
}
|