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

Unified Diff: tests/standalone/io/file_windows_test.dart

Issue 145623011: Allow paths up to 32767 characters on Windows (so '\\?\' can be used). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test. Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/directory_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/file_windows_test.dart
diff --git a/tests/standalone/io/file_windows_test.dart b/tests/standalone/io/file_windows_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..f27f49fc520214edfbd794e179728ae8ea23cc20
--- /dev/null
+++ b/tests/standalone/io/file_windows_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2013, 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';
+
+import "package:expect/expect.dart";
+
+void testDeleteLongPathPrefix() {
+ var dir = Directory.systemTemp.createTempSync('dart_file_win');
+ var dirPath = "\\\\?\\${dir.path}";
+ var subPath = dirPath;
+ for (int i = 0; i < 16; i++) {
+ subPath += "\\a-long-path-segment";
+ dir = new Directory(subPath)..createSync();
+ }
+ Expect.isTrue(dir.path.length > 256);
+ var prefixDir = new Directory(dirPath);
+ Expect.isTrue(prefixDir.existsSync());
+ prefixDir.deleteSync(recursive: true);
+ Expect.isFalse(dir.existsSync());
+ Expect.isFalse(prefixDir.existsSync());
+}
+
+
+void main() {
+ if (!Platform.isWindows) return;
+ testDeleteLongPathPrefix();
+}
« no previous file with comments | « runtime/bin/directory_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698