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

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

Issue 11096026: Revert "Improving relative path support." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « runtime/bin/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 a2b39a603dbbdbb3b5baf3a200e31d5b1ca87791..b448c9a379ed0fc54dd4854d65ff15df42a97a7b 100644
--- a/tests/standalone/io/path_test.dart
+++ b/tests/standalone/io/path_test.dart
@@ -10,7 +10,6 @@ void main() {
testBaseFunctions();
testCanonicalize();
testJoinAppend();
- testRelativeTo();
}
void testBaseFunctions() {
@@ -164,9 +163,8 @@ void testJoinAppend() {
// .join can only join a relative path to a path.
// It cannot join an absolute path to a path.
Expect.throws(() => new Path('/a/b/').join(new Path('/c/d')));
-}
-void testRelativeTo() {
+ // Test Path.relativeTo.
Expect.equals('c/d',
new Path('/a/b/c/d').relativeTo(new Path('/a/b')).toString());
Expect.equals('c/d',
@@ -174,19 +172,6 @@ void testRelativeTo() {
Expect.equals('.',
new Path('/a').relativeTo(new Path('/a')).toString());
- // Trailing / in base path represents directory
- Expect.equals('../../z/x/y',
- new Path('/a/b/z/x/y').relativeTo(new Path('/a/b/c/d/')).toString());
- Expect.equals('../z/x/y',
- new Path('/a/b/z/x/y').relativeTo(new Path('/a/b/c/d')).toString());
- Expect.equals('../z/x/y/',
- new Path('/a/b/z/x/y/').relativeTo(new Path('/a/b/c/d')).toString());
-
- Expect.equals('../../z/x/y',
- new Path('/z/x/y').relativeTo(new Path('/a/b/c')).toString());
- Expect.equals('../../../z/x/y',
- new Path('/z/x/y').relativeTo(new Path('/a/b/c/')).toString());
-
// Not implemented yet. Should return new Path('../b/c/d/').
Expect.throws(() =>
new Path('b/c/d/').relativeTo(new Path('a/')));
« no previous file with comments | « runtime/bin/path_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698