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

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

Issue 11759007: Fix Directory.create(recursive: true) for non-existing paths. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 12 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 | « sdk/lib/io/directory_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/regress_7679_test.dart
diff --git a/tests/standalone/io/regress_7679_test.dart b/tests/standalone/io/regress_7679_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..b13c249cd765b5303962bb6b5c22b23ee71020eb
--- /dev/null
+++ b/tests/standalone/io/regress_7679_test.dart
@@ -0,0 +1,35 @@
+// 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() {
+ Directory temp = new Directory('').createTempSync();
+ File script = new File('${temp.path}/script.dart');
+ script.writeAsStringSync("""
+import 'dart:io';
+
+main() {
+ Directory d = new Directory('a');
+ d.create(recursive: true).then((_) {
+ d.exists().then((result) {
+ Expect.isTrue(result);
+ d = new Directory('b/c/d');
+ d.create(recursive: true).then((_) {
+ d.exists().then((result) {
+ Expect.isTrue(result);
+ });
+ });
+ });
+ });
+}
+""");
+ ProcessOptions options = new ProcessOptions();
+ options.workingDirectory = temp.path;
+ String executable = new File(new Options().executable).fullPathSync();
+ Process.run(executable, ['script.dart'], options).then((result) {
+ temp.deleteSync(recursive: true);
+ Expect.equals(0, result.exitCode);
+ });
+}
« no previous file with comments | « sdk/lib/io/directory_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698