Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Side by Side Diff: tests/standalone/io/windows_environment_test.dart

Issue 19967002: Remove uses of Path class from tests/standalone. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix windows error Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/io/web_socket_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:path/path.dart';
5 import 'package:expect/expect.dart'; 6 import 'package:expect/expect.dart';
6 import "dart:io"; 7 import "dart:io";
7 8
8 main() { 9 main() {
9 if (Platform.operatingSystem != 'windows') return; 10 if (Platform.operatingSystem != 'windows') return;
10 var tempDir = new Directory('').createTempSync(); 11 var tempDir = new Directory('').createTempSync();
11 var funkyDir = new Directory("${tempDir.path}/å"); 12 var funkyDir = new Directory("${tempDir.path}/å");
12 funkyDir.createSync(); 13 funkyDir.createSync();
13 var funkyFile = new File('${funkyDir.path}/funky.bat'); 14 var funkyFile = new File('${funkyDir.path}/funky.bat');
14 funkyFile.writeAsStringSync(""" 15 funkyFile.writeAsStringSync("""
15 @echo off 16 @echo off
16 set SCRIPTDIR=%~dp0 17 set SCRIPTDIR=%~dp0
17 %1 %2 18 %1 %2
18 """); 19 """);
19 var dart = Platform.executable; 20 var dart = Platform.executable;
20 var scriptDir = new Path(Platform.script).directoryPath; 21 var script = join(dirname(Platform.script),
21 var script = scriptDir.append('windows_environment_script.dart'); 22 'windows_environment_script.dart');
22 Process.run('cmd', 23 Process.run('cmd',
23 ['/c', funkyFile.path, dart, script.toNativePath()]).then((p) { 24 ['/c', funkyFile.path, dart, script]).then((p) {
24 if (0 != p.exitCode) throw "Exit code not 0"; 25 if (0 != p.exitCode) throw "Exit code not 0";
25 tempDir.deleteSync(recursive: true); 26 tempDir.deleteSync(recursive: true);
26 }); 27 });
27 } 28 }
OLDNEW
« no previous file with comments | « tests/standalone/io/web_socket_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698