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

Unified Diff: packages/path/test/path_test.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 | « packages/path/test/io_test.dart ('k') | packages/path/test/posix_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/path/test/path_test.dart
diff --git a/packages/path/test/path_test.dart b/packages/path/test/path_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..19397cf8d3c86e9cc88199812f29f8566b99b464
--- /dev/null
+++ b/packages/path/test/path_test.dart
@@ -0,0 +1,52 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:unittest/unittest.dart';
+import 'package:path/path.dart' as path;
+
+main() {
+ group('path.Style', () {
+ test('name', () {
+ expect(path.Style.posix.name, 'posix');
+ expect(path.Style.windows.name, 'windows');
+ });
+
+ test('separator', () {
+ expect(path.Style.posix.separator, '/');
+ expect(path.Style.windows.separator, '\\');
+ });
+
+ test('toString()', () {
+ expect(path.Style.posix.toString(), 'posix');
+ expect(path.Style.windows.toString(), 'windows');
+ });
+ });
+
+ group('new Context()', () {
+ test('uses the given current directory', () {
+ var context = new path.Context(current: '/a/b/c');
+ expect(context.current, '/a/b/c');
+ });
+
+ test('uses the given style', () {
+ var context = new path.Context(style: path.Style.windows);
+ expect(context.style, path.Style.windows);
+ });
+ });
+
+ test('posix is a default Context for the POSIX style', () {
+ expect(path.posix.style, path.Style.posix);
+ expect(path.posix.current, ".");
+ });
+
+ test('windows is a default Context for the Windows style', () {
+ expect(path.windows.style, path.Style.windows);
+ expect(path.windows.current, ".");
+ });
+
+ test('url is a default Context for the URL style', () {
+ expect(path.url.style, path.Style.url);
+ expect(path.url.current, ".");
+ });
+}
« no previous file with comments | « packages/path/test/io_test.dart ('k') | packages/path/test/posix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698