| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import "dart:io"; | 6 import "dart:io"; |
| 7 | 7 |
| 8 testFile(String input) { | 8 testFile(String input) { |
| 9 if (Platform.isWindows) { | 9 if (Platform.isWindows) { |
| 10 input = input.replaceAll('/', '\\'); | 10 input = input.replaceAll('/', '\\'); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 Expect.equals(output, dir2.path, input); | 27 Expect.equals(output, dir2.path, input); |
| 28 } | 28 } |
| 29 | 29 |
| 30 void main() { | 30 void main() { |
| 31 testFile(""); | 31 testFile(""); |
| 32 testFile("/"); | 32 testFile("/"); |
| 33 testFile("foo/bar"); | 33 testFile("foo/bar"); |
| 34 testFile("/foo/bar"); | 34 testFile("/foo/bar"); |
| 35 testFile("/foo/bar/"); | 35 testFile("/foo/bar/"); |
| 36 | 36 |
| 37 testDirectory("", "/"); | 37 testDirectory(""); |
| 38 testDirectory("/"); | 38 testDirectory("/"); |
| 39 testDirectory("foo/bar", "foo/bar/"); | 39 testDirectory("foo/bar", "foo/bar/"); |
| 40 testDirectory("/foo/bar", "/foo/bar/"); | 40 testDirectory("/foo/bar", "/foo/bar/"); |
| 41 testDirectory("/foo/bar/"); | 41 testDirectory("/foo/bar/"); |
| 42 } | 42 } |
| OLD | NEW |