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

Unified Diff: pkg/path/test/windows_test.dart

Issue 19219002: Test empty strings arguments to path.join(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Handle trailing empty string args in path.join(). Created 7 years, 5 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 | « pkg/path/test/url_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/path/test/windows_test.dart
diff --git a/pkg/path/test/windows_test.dart b/pkg/path/test/windows_test.dart
index 7b3cf6004783fbb5c386e960084b831ab9613160..74094397461b7ab0cb859318cd8557d20782ea1a 100644
--- a/pkg/path/test/windows_test.dart
+++ b/pkg/path/test/windows_test.dart
@@ -172,6 +172,14 @@ main() {
expect(builder.join('a', 'b', 'c', null, null), equals(r'a\b\c'));
});
+ test('ignores empty strings', () {
+ expect(builder.join(''), '');
+ expect(builder.join('', ''), '');
+ expect(builder.join('', 'a'), 'a');
+ expect(builder.join('a', '', 'b', '', '', '', 'c'), r'a\b\c');
+ expect(builder.join('a', 'b', ''), r'a\b');
+ });
+
test('disallows intermediate nulls', () {
expect(() => builder.join('a', null, 'b'), throwsArgumentError);
expect(() => builder.join(null, 'a'), throwsArgumentError);
« no previous file with comments | « pkg/path/test/url_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698