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

Side by Side Diff: utils/tests/pub/path/path_windows_test.dart

Issue 11557008: Make pub publish more user friendly: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge in path changes. Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/tests/pub/path/path_posix_test.dart ('k') | utils/tests/pub/pub_lish_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library path_test; 5 library path_test;
6 6
7 import 'dart:io' as io; 7 import 'dart:io' as io;
8 8
9 import '../../../../pkg/unittest/lib/unittest.dart'; 9 import '../../../../pkg/unittest/lib/unittest.dart';
10 import '../../../pub/path.dart' as path; 10 import '../../../pub/path.dart' as path;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 }); 165 });
166 166
167 test('disallows intermediate nulls', () { 167 test('disallows intermediate nulls', () {
168 expect(() => builder.join('a', null, 'b'), throwsArgumentError); 168 expect(() => builder.join('a', null, 'b'), throwsArgumentError);
169 expect(() => builder.join(null, 'a'), throwsArgumentError); 169 expect(() => builder.join(null, 'a'), throwsArgumentError);
170 }); 170 });
171 }); 171 });
172 172
173 group('split', () { 173 group('split', () {
174 test('simple cases', () { 174 test('simple cases', () {
175 expect(builder.split(''), []);
176 expect(builder.split('.'), ['.']);
177 expect(builder.split('..'), ['..']);
175 expect(builder.split('foo'), equals(['foo'])); 178 expect(builder.split('foo'), equals(['foo']));
176 expect(builder.split(r'foo\bar'), equals(['foo', 'bar'])); 179 expect(builder.split(r'foo\bar.txt'), equals(['foo', 'bar.txt']));
177 expect(builder.split(r'foo\bar\baz'), equals(['foo', 'bar', 'baz'])); 180 expect(builder.split(r'foo\bar/baz'), equals(['foo', 'bar', 'baz']));
178 expect(builder.split(r'foo\..\bar\.\baz'), 181 expect(builder.split(r'foo\..\bar\.\baz'),
179 equals(['foo', '..', 'bar', '.', 'baz'])); 182 equals(['foo', '..', 'bar', '.', 'baz']));
180 expect(builder.split(r'foo\\bar\\\baz'), equals(['foo', 'bar', 'baz'])); 183 expect(builder.split(r'foo\\bar\\\baz'), equals(['foo', 'bar', 'baz']));
181 expect(builder.split(r'foo\/\baz'), equals(['foo', 'baz'])); 184 expect(builder.split(r'foo\/\baz'), equals(['foo', 'baz']));
182 expect(builder.split('.'), equals(['.'])); 185 expect(builder.split('.'), equals(['.']));
183 expect(builder.split(''), equals([])); 186 expect(builder.split(''), equals([]));
184 expect(builder.split('foo/'), equals(['foo'])); 187 expect(builder.split('foo/'), equals(['foo']));
185 expect(builder.split(r'C:\'), equals([r'C:\'])); 188 expect(builder.split(r'C:\'), equals([r'C:\']));
186 }); 189 });
187 190
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 expect(builder.withoutExtension(r'a\b\'), r'a\b\'); 386 expect(builder.withoutExtension(r'a\b\'), r'a\b\');
384 expect(builder.withoutExtension(r'a\.'), r'a\.'); 387 expect(builder.withoutExtension(r'a\.'), r'a\.');
385 expect(builder.withoutExtension(r'a\.b'), r'a\.b'); 388 expect(builder.withoutExtension(r'a\.b'), r'a\.b');
386 expect(builder.withoutExtension(r'a.b\c'), r'a.b\c'); 389 expect(builder.withoutExtension(r'a.b\c'), r'a.b\c');
387 expect(builder.withoutExtension(r'a/b.c/d'), r'a/b.c/d'); 390 expect(builder.withoutExtension(r'a/b.c/d'), r'a/b.c/d');
388 expect(builder.withoutExtension(r'a\b/c'), r'a\b/c'); 391 expect(builder.withoutExtension(r'a\b/c'), r'a\b/c');
389 expect(builder.withoutExtension(r'a\b/c.d'), r'a\b/c'); 392 expect(builder.withoutExtension(r'a\b/c.d'), r'a\b/c');
390 expect(builder.withoutExtension(r'a.b/c'), r'a.b/c'); 393 expect(builder.withoutExtension(r'a.b/c'), r'a.b/c');
391 }); 394 });
392 } 395 }
OLDNEW
« no previous file with comments | « utils/tests/pub/path/path_posix_test.dart ('k') | utils/tests/pub/pub_lish_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698