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

Unified Diff: pkg/pathos/test/pathos_windows_test.dart

Issue 15967012: Make pathos run in the browser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Bug fix. Created 7 years, 6 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
Index: pkg/pathos/test/pathos_windows_test.dart
diff --git a/pkg/pathos/test/pathos_windows_test.dart b/pkg/pathos/test/pathos_windows_test.dart
index 8419b53be1c6c97784c2fc1e78bd4f01f2a2b0bb..6d22742fee0c5a30c7b702db3586df24eee1a759 100644
--- a/pkg/pathos/test/pathos_windows_test.dart
+++ b/pkg/pathos/test/pathos_windows_test.dart
@@ -4,8 +4,6 @@
library pathos_windows_test;
-import 'dart:io' as io;
-
import 'package:unittest/unittest.dart';
import 'package:pathos/path.dart' as path;
@@ -333,6 +331,12 @@ main() {
expect(builder.relative(r'..\a\b.txt'), r'..\a\b.txt');
expect(builder.relative(r'a\.\b\..\c.txt'), r'a\c.txt');
});
+
+ // Regression
+ test('from root-only path', () {
+ expect(builder.relative(r'C:\', from: r'C:\'), '.');
+ expect(builder.relative(r'C:\root\path', from: r'C:\'), r'root\path');
+ });
});
group('from relative root', () {
@@ -385,6 +389,12 @@ main() {
expect(builder.relative(r'D:\a\b'), r'D:\a\b');
expect(builder.relative(r'\\a\b'), r'\\a\b');
});
+
+ test('from a . root', () {
+ var r = new path.Builder(style: path.Style.windows, root: '.');
+ expect(r.relative(r'C:\foo\bar\baz'), equals(r'C:\foo\bar\baz'));
+ expect(r.relative(r'foo\bar\baz'), equals(r'foo\bar\baz'));
+ });
});
group('resolve', () {

Powered by Google App Engine
This is Rietveld 408576698