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

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

Issue 25471003: Modify tests to use Directory.systemTemp (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 7 years, 2 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
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 6
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 9
10 void main() { 10 void main() {
11 // temp/ 11 // temp/
12 // a/ 12 // a/
13 // file.txt 13 // file.txt
14 // b/ 14 // b/
15 // a_link -> a 15 // a_link -> a
16 var d = new Directory("").createTempSync(); 16 var d = Directory.systemTemp.createTempSync('dart_delete_symlink');
17 var a = new Directory("${d.path}/a"); 17 var a = new Directory("${d.path}/a");
18 a.createSync(); 18 a.createSync();
19 19
20 var b = new Directory("${d.path}/b"); 20 var b = new Directory("${d.path}/b");
21 b.createSync(); 21 b.createSync();
22 22
23 var f = new File("${d.path}/a/file.txt"); 23 var f = new File("${d.path}/a/file.txt");
24 f.createSync(); 24 f.createSync();
25 Expect.isTrue(f.existsSync()); 25 Expect.isTrue(f.existsSync());
26 26
(...skipping 16 matching lines...) Expand all
43 // We should not have recursed through a_link into a. 43 // We should not have recursed through a_link into a.
44 Expect.isTrue(f.existsSync()); 44 Expect.isTrue(f.existsSync());
45 45
46 // Clean up after ourselves. 46 // Clean up after ourselves.
47 d.deleteSync(recursive: true); 47 d.deleteSync(recursive: true);
48 48
49 // Terminate now that we are done with everything. 49 // Terminate now that we are done with everything.
50 asyncEnd(); 50 asyncEnd();
51 }); 51 });
52 } 52 }
OLDNEW
« no previous file with comments | « tests/standalone/io/dart_std_io_pipe_test.dart ('k') | tests/standalone/io/directory_chdir_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698