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

Unified Diff: tests/standalone/io/link_async_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/http_headers_test.dart ('k') | tests/standalone/io/link_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/link_async_test.dart
diff --git a/tests/standalone/io/link_async_test.dart b/tests/standalone/io/link_async_test.dart
index f310e8c81cd14969fe469dcf4b669fc26b4a7728..bfcfd4aafa98921cac8d550463a0328b3b75e0e1 100644
--- a/tests/standalone/io/link_async_test.dart
+++ b/tests/standalone/io/link_async_test.dart
@@ -29,7 +29,12 @@ class FutureExpect {
Future testCreate() {
- return new Directory('').createTemp().then((baseDir) {
+ return Directory.systemTemp.createTemp('dart_link_async').then((baseDir) {
+ if (isRelative(baseDir.path)) {
+ Expect.fail(
+ 'Link tests expect absolute paths to system temporary directories. '
+ 'A relative path in TMPDIR gives relative paths to them.');
+ }
String base = baseDir.path;
String link = join(base, 'link');
String target = join(base, 'target');
@@ -141,7 +146,7 @@ Future testCreate() {
Future testCreateLoopingLink(_) {
- return new Directory('').createTemp()
+ return Directory.systemTemp.createTemp('dart_link_async')
.then((dir) => dir.path)
.then((String base) =>
new Directory(join(base, 'a', 'b', 'c')).create(recursive: true)
@@ -200,7 +205,7 @@ Future testRename(_) {
.then((_) => Expect.isFalse(link1.existsSync()));
}
- return new Directory('').createTemp().then((baseDir) {
+ return Directory.systemTemp.createTemp('dart_link_async').then((baseDir) {
String base = baseDir.path;
var targetsFutures = [];
targetsFutures.add(new Directory(join(base, 'a')).create());
@@ -275,7 +280,9 @@ Future checkExists(String filePath) =>
new File(filePath).exists().then(Expect.isTrue);
Future testRelativeLinks(_) {
- return new Directory('').createTemp().then((tempDirectory) {
+ return Directory.systemTemp
+ .createTemp('dart_link_async')
+ .then((tempDirectory) {
String temp = tempDirectory.path;
String oldWorkingDirectory = Directory.current.path;
// Make directories and files to test links.
« no previous file with comments | « tests/standalone/io/http_headers_test.dart ('k') | tests/standalone/io/link_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698