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

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

Issue 12426013: dart:io | The empty path should return "." for its toNativePath value. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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/path_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/path_test.dart
diff --git a/tests/standalone/io/path_test.dart b/tests/standalone/io/path_test.dart
index 895295745e997b94c0c078da7afe8ef752ee0c3e..99756cb3d7de40592378a2a37b26b7dd7dd16bd3 100644
--- a/tests/standalone/io/path_test.dart
+++ b/tests/standalone/io/path_test.dart
@@ -9,6 +9,7 @@ import "dart:io";
void main() {
testBaseFunctions();
testRaw();
+ testToNativePath();
testCanonicalize();
testJoinAppend();
testRelativeTo();
@@ -115,6 +116,12 @@ void testRaw() {
Expect.equals(new Path.raw('\\bar\u2603\n.').toString(), '\\bar\u2603\n.');
}
+void testToNativePath() {
+ Expect.equals('.', new Path('').toNativePath());
+ Expect.equals('.', new Path('.').toNativePath());
+ Expect.equals('.', new Path('a_file').directoryPath.toNativePath());
+}
+
void testCanonicalize() {
Function t = (input, canonicalized) {
Expect.equals(canonicalized, new Path(input).canonicalize().toString());
« no previous file with comments | « sdk/lib/io/path_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698