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

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

Issue 18535002: Fix stdin_sync_test on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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/stdin_sync_script.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "dart:io"; 5 import "dart:io";
6 import "dart:json"; 6 import "dart:json";
7 7
8 void test(String line, List<String> expected) { 8 void test(String line, List<String> expected) {
9 var script = new Path(Platform.script).directoryPath; 9 var script = new Path(Platform.script).directoryPath;
10 script = script.append("stdin_sync_script.dart"); 10 script = script.append("stdin_sync_script.dart");
(...skipping 19 matching lines...) Expand all
30 }); 30 });
31 } 31 }
32 32
33 void main() { 33 void main() {
34 test("hej\x01\x00\x0d\x0a\x0a4\x0a", ['hej\x01\x00', '', '4']); 34 test("hej\x01\x00\x0d\x0a\x0a4\x0a", ['hej\x01\x00', '', '4']);
35 35
36 test("hej\u0187", ['hej\u0187']); 36 test("hej\u0187", ['hej\u0187']);
37 37
38 test("hej\rhej\nhej\r", ['hej\rhej', 'hej\r']); 38 test("hej\rhej\nhej\r", ['hej\rhej', 'hej\r']);
39 39
40 test("hej\r\r\nhej\r\nhej\r", ['hej\r', 'hej', 'hej\r']); 40 if (Platform.isWindows) {
41 // Windows trim one of the \r.
42 test("hej\r\r\r\nhej\r\nhej\r", ['hej\r', 'hej', 'hej\r']);
43 } else {
44 test("hej\r\r\nhej\r\nhej\r", ['hej\r', 'hej', 'hej\r']);
Bill Hesse 2013/07/02 14:49:43 This indicates an error in the newline handling wi
45 }
41 46
42 test("hej", ['hej']); 47 test("hej", ['hej']);
43 } 48 }
OLDNEW
« no previous file with comments | « tests/standalone/io/stdin_sync_script.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698