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

Side by Side Diff: pkg/pathos/test/pathos_test.dart

Issue 13896034: Add the ability to change the working directory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed tests Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/pathos/lib/path.dart ('k') | runtime/bin/builtin_natives.cc » ('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 pathos_test; 5 library pathos_test;
6 6
7 import 'dart:io' as io; 7 import 'dart:io' as io;
8 8
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 import 'package:pathos/path.dart' as path; 10 import 'package:pathos/path.dart' as path;
(...skipping 22 matching lines...) Expand all
33 expect(builder.root, '/a/b/c'); 33 expect(builder.root, '/a/b/c');
34 }); 34 });
35 35
36 test('uses the given style', () { 36 test('uses the given style', () {
37 var builder = new path.Builder(style: path.Style.windows); 37 var builder = new path.Builder(style: path.Style.windows);
38 expect(builder.style, path.Style.windows); 38 expect(builder.style, path.Style.windows);
39 }); 39 });
40 40
41 test('uses the current working directory if root is omitted', () { 41 test('uses the current working directory if root is omitted', () {
42 var builder = new path.Builder(); 42 var builder = new path.Builder();
43 expect(builder.root, new io.Directory.current().path); 43 expect(builder.root, io.Directory.current.path);
44 }); 44 });
45 45
46 test('uses the host OS if style is omitted', () { 46 test('uses the host OS if style is omitted', () {
47 var builder = new path.Builder(); 47 var builder = new path.Builder();
48 if (io.Platform.operatingSystem == 'windows') { 48 if (io.Platform.operatingSystem == 'windows') {
49 expect(builder.style, path.Style.windows); 49 expect(builder.style, path.Style.windows);
50 } else { 50 } else {
51 expect(builder.style, path.Style.posix); 51 expect(builder.style, path.Style.posix);
52 } 52 }
53 }); 53 });
54 }); 54 });
55 55
56 test('current', () { 56 test('current', () {
57 expect(path.current, new io.Directory.current().path); 57 expect(path.current, io.Directory.current.path);
58 }); 58 });
59 } 59 }
OLDNEW
« no previous file with comments | « pkg/pathos/lib/path.dart ('k') | runtime/bin/builtin_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698