Files
sdk/tests/standalone/io/windows_environment_script.dart
T
Alexander Markov fc317794dd [test] Fix standalone/io/windows_environment_test for NNBD
This test launches Dart sub-process and should pass VM options like
--enable-experiment=non-nullable and --sound-null-safety, otherwise
sub-process will try to run migrated Dart code without appropriate
flags.

Also, fix NNBD compile-time error in
tests/standalone/io/windows_environment_script.dart

Change-Id: I5bc0bf4ba32a3933c236c1a2f04cea3d7a1fa31a
Fixed: 1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167722
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-15 18:32:40 +00:00

15 lines
638 B
Dart

// Copyright (c) 2012, 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:io";
main() {
var scriptDir = Platform.environment['SCRIPTDIR']!;
if (!scriptDir.contains('å')) throw "scriptDir not containing character å";
scriptDir = Platform.environment['ScriptDir']!;
if (!scriptDir.contains('å')) throw "scriptDir not containing character å";
var str = new File('$scriptDir/funky.bat').readAsStringSync();
if (!str.contains('%~dp0')) throw "str not containing dp0";
}