Index: pkg/path/test/posix_test.dart |
diff --git a/pkg/path/test/posix_test.dart b/pkg/path/test/posix_test.dart |
index f3232bc818e9f67a1812c2b57aefcfa3b6b29789..c26a5ba8969b15ac5d9b084b4da93d952e12b2f4 100644 |
--- a/pkg/path/test/posix_test.dart |
+++ b/pkg/path/test/posix_test.dart |
@@ -153,6 +153,14 @@ main() { |
expect(builder.join('a', 'b', 'c', null, null), equals('a/b/c')); |
}); |
+ test('ignores empty strings', () { |
+ expect(builder.join(''), ''); |
+ expect(builder.join('', ''), ''); |
+ expect(builder.join('', 'a'), 'a'); |
+ expect(builder.join('a', '', 'b', '', '', '', 'c'), 'a/b/c'); |
+ expect(builder.join('a', 'b', ''), 'a/b'); |
+ }); |
+ |
test('disallows intermediate nulls', () { |
expect(() => builder.join('a', null, 'b'), throwsArgumentError); |
expect(() => builder.join(null, 'a'), throwsArgumentError); |