| Index: tests/standalone/io/windows_environment_test.dart
|
| diff --git a/tests/standalone/io/windows_environment_test.dart b/tests/standalone/io/windows_environment_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..34dc2a2e5181b74f6800ccd0a6503784ebda9dd8
|
| --- /dev/null
|
| +++ b/tests/standalone/io/windows_environment_test.dart
|
| @@ -0,0 +1,27 @@
|
| +// 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() {
|
| + if (Platform.operatingSystem != 'windows') return;
|
| + var tempDir = new Directory('').createTempSync();
|
| + var funkyDir = new Directory("${tempDir.path}/å");
|
| + funkyDir.createSync();
|
| + var funkyFile = new File('${funkyDir.path}/funky.bat');
|
| + funkyFile.writeAsStringSync("""
|
| +@echo off
|
| +set SCRIPTDIR=%~dp0
|
| +%1 %2
|
| + """);
|
| + var options = new Options();
|
| + var dart = options.executable;
|
| + var scriptDir = new Path.fromNative(options.script).directoryPath;
|
| + var script = scriptDir.append('windows_environment_script.dart');
|
| + Process.run('cmd',
|
| + ['/c', funkyFile.name, dart, script.toNativePath()]).then((p) {
|
| + Expect.equals(0, p.exitCode);
|
| + tempDir.deleteSync(recursive: true);
|
| + });
|
| +}
|
|
|