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

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

Issue 52723007: Revert "Change dart:io Platform.script to return a Uri." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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') | tests/standalone/typed_data_isolate_test.dart » ('j') | 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:path/path.dart';
6 import 'package:expect/expect.dart'; 6 import 'package:expect/expect.dart';
7 import "dart:io"; 7 import "dart:io";
8 8
9 main() { 9 main() {
10 if (Platform.operatingSystem != 'windows') return; 10 if (Platform.operatingSystem != 'windows') return;
11 var tempDir = Directory.systemTemp.createTempSync('dart_windows_environment'); 11 var tempDir = Directory.systemTemp.createTempSync('dart_windows_environment');
12 var funkyDir = new Directory(join(tempDir.path, 'å')); 12 var funkyDir = new Directory(join(tempDir.path, 'å'));
13 funkyDir.createSync(); 13 funkyDir.createSync();
14 var funkyFile = new File(join(funkyDir.path, 'funky.bat')); 14 var funkyFile = new File(join(funkyDir.path, 'funky.bat'));
15 funkyFile.writeAsStringSync(""" 15 funkyFile.writeAsStringSync("""
16 @echo off 16 @echo off
17 set SCRIPTDIR=%~dp0 17 set SCRIPTDIR=%~dp0
18 %1 %2 18 %1 %2
19 """); 19 """);
20 var dart = Platform.executable; 20 var dart = Platform.executable;
21 var script = Platform.script 21 var script = join(dirname(Platform.script),
22 .resolve('windows_environment_script.dart') 22 'windows_environment_script.dart');
23 .toFilePath();
24 Process.run('cmd', 23 Process.run('cmd',
25 ['/c', funkyFile.path, dart, script]).then((p) { 24 ['/c', funkyFile.path, dart, script]).then((p) {
26 if (0 != p.exitCode) throw "Exit code not 0"; 25 if (0 != p.exitCode) throw "Exit code not 0";
27 tempDir.deleteSync(recursive: true); 26 tempDir.deleteSync(recursive: true);
28 }); 27 });
29 } 28 }
OLDNEW
« no previous file with comments | « tests/standalone/io/web_socket_test.dart ('k') | tests/standalone/typed_data_isolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698