Index: test/io_test.dart |
diff --git a/test/io_test.dart b/test/io_test.dart |
index c8016a82d9190bada096db7a5cdbe59e01d4f5bd..f73a00388ae4978670b6f37a3cef97cb9f371c24 100644 |
--- a/test/io_test.dart |
+++ b/test/io_test.dart |
@@ -21,22 +21,18 @@ void main() { |
var overwriteOptions = new FormatterOptions(OutputReporter.overwrite); |
- var followOptions = new FormatterOptions(OutputReporter.overwrite, |
- followLinks: true); |
+ var followOptions = |
+ new FormatterOptions(OutputReporter.overwrite, followLinks: true); |
test('handles directory ending in ".dart"', () { |
- d.dir('code.dart', [ |
- d.file('a.dart', unformattedSource), |
- ]).create(); |
+ d.dir('code.dart', [d.file('a.dart', unformattedSource),]).create(); |
schedule(() { |
var dir = new Directory(d.defaultRoot); |
processDirectory(overwriteOptions, dir); |
}, 'Run formatter.'); |
- d.dir('code.dart', [ |
- d.file('a.dart', formattedSource) |
- ]).validate(); |
+ d.dir('code.dart', [d.file('a.dart', formattedSource)]).validate(); |
}); |
test("doesn't touch unchanged files", () { |
@@ -75,47 +71,33 @@ void main() { |
}); |
test("skips subdirectories whose name starts with '.'", () { |
- d.dir('code', [ |
- d.dir('.skip', [ |
- d.file('a.dart', unformattedSource) |
- ]) |
- ]).create(); |
+ d.dir('code', [d.dir('.skip', [d.file('a.dart', unformattedSource)])]) |
+ .create(); |
schedule(() { |
var dir = new Directory(d.defaultRoot); |
processDirectory(overwriteOptions, dir); |
}, 'Run formatter.'); |
- d.dir('code', [ |
- d.dir('.skip', [ |
- d.file('a.dart', unformattedSource) |
- ]) |
- ]).validate(); |
+ d.dir('code', [d.dir('.skip', [d.file('a.dart', unformattedSource)])]) |
+ .validate(); |
}); |
test("traverses the given directory even if its name starts with '.'", () { |
- d.dir('.code', [ |
- d.file('a.dart', unformattedSource) |
- ]).create(); |
+ d.dir('.code', [d.file('a.dart', unformattedSource)]).create(); |
schedule(() { |
var dir = new Directory(p.join(d.defaultRoot, '.code')); |
processDirectory(overwriteOptions, dir); |
}, 'Run formatter.'); |
- d.dir('.code', [ |
- d.file('a.dart', formattedSource) |
- ]).validate(); |
+ d.dir('.code', [d.file('a.dart', formattedSource)]).validate(); |
}); |
test("doesn't follow directory symlinks by default", () { |
- d.dir('code', [ |
- d.file('a.dart', unformattedSource), |
- ]).create(); |
+ d.dir('code', [d.file('a.dart', unformattedSource),]).create(); |
- d.dir('target_dir', [ |
- d.file('b.dart', unformattedSource), |
- ]).create(); |
+ d.dir('target_dir', [d.file('b.dart', unformattedSource),]).create(); |
schedule(() { |
// Create a link to the target directory in the code directory. |
@@ -130,20 +112,14 @@ void main() { |
d.dir('code', [ |
d.file('a.dart', formattedSource), |
- d.dir('linked_dir', [ |
- d.file('b.dart', unformattedSource), |
- ]) |
+ d.dir('linked_dir', [d.file('b.dart', unformattedSource),]) |
]).validate(); |
}); |
test("follows directory symlinks when 'followLinks' is true", () { |
- d.dir('code', [ |
- d.file('a.dart', unformattedSource), |
- ]).create(); |
+ d.dir('code', [d.file('a.dart', unformattedSource),]).create(); |
- d.dir('target_dir', [ |
- d.file('b.dart', unformattedSource), |
- ]).create(); |
+ d.dir('target_dir', [d.file('b.dart', unformattedSource),]).create(); |
schedule(() { |
// Create a link to the target directory in the code directory. |
@@ -158,9 +134,7 @@ void main() { |
d.dir('code', [ |
d.file('a.dart', formattedSource), |
- d.dir('linked_dir', [ |
- d.file('b.dart', formattedSource), |
- ]) |
+ d.dir('linked_dir', [d.file('b.dart', formattedSource),]) |
]).validate(); |
}); |
@@ -180,9 +154,8 @@ void main() { |
processDirectory(overwriteOptions, dir); |
}, 'Run formatter.'); |
- d.dir('code', [ |
- d.file('linked_file.dart', unformattedSource), |
- ]).validate(); |
+ d.dir('code', [d.file('linked_file.dart', unformattedSource),]) |
+ .validate(); |
}); |
test("follows file symlinks when 'followLinks' is true", () { |
@@ -200,9 +173,7 @@ void main() { |
processDirectory(followOptions, dir); |
}, 'running formatter'); |
- d.dir('code', [ |
- d.file('linked_file.dart', formattedSource), |
- ]).validate(); |
+ d.dir('code', [d.file('linked_file.dart', formattedSource),]).validate(); |
}); |
} |
} |