Files
sdk/tests/standalone/io/windows_environment_script.dart
T
ager@google.com c31250d58b Make Platform.environment case-insensitive on Windows.
Environment variables on Windows are case-insensitive. In order
to reliably be able to test if an environment variable is set
and get its value, we therefore need to go case-insensitive.

R=sgjesse@google.com
BUG=dartbug.com/7454

Review URL: https://codereview.chromium.org//11578048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16571 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 11:26:31 +00:00

15 lines
540 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'];
Expect.isTrue(scriptDir.contains('å'));
scriptDir = Platform.environment['ScriptDir'];
Expect.isTrue(scriptDir.contains('å'));
var str = new File('$scriptDir/funky.bat').readAsStringSync();
Expect.isTrue(str.contains('%~dp0'));
}