| Index: sdk/lib/_internal/pub_generated/test/ascii_tree_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/ascii_tree_test.dart b/sdk/lib/_internal/pub_generated/test/ascii_tree_test.dart
|
| similarity index 68%
|
| copy from sdk/lib/_internal/pub/test/ascii_tree_test.dart
|
| copy to sdk/lib/_internal/pub_generated/test/ascii_tree_test.dart
|
| index 96d81ee7bc53fe8180dfd6ecf8ccb68d18809a3b..435416c3f83cfdfe0b694a31819c47d0be5287f4 100644
|
| --- a/sdk/lib/_internal/pub/test/ascii_tree_test.dart
|
| +++ b/sdk/lib/_internal/pub_generated/test/ascii_tree_test.dart
|
| @@ -1,35 +1,25 @@
|
| -// 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.
|
| -
|
| library lock_file_test;
|
| -
|
| import 'package:unittest/unittest.dart';
|
| -
|
| import '../lib/src/ascii_tree.dart' as tree;
|
| import '../lib/src/utils.dart';
|
| -
|
| main() {
|
| runningAsTest = true;
|
| -
|
| group('tree.fromFiles', () {
|
| test('no files', () {
|
| expect(tree.fromFiles([]), equals(""));
|
| });
|
| -
|
| test('up to ten files in one directory are shown', () {
|
| var files = [
|
| - "dir/a.dart",
|
| - "dir/b.dart",
|
| - "dir/c.dart",
|
| - "dir/d.dart",
|
| - "dir/e.dart",
|
| - "dir/f.dart",
|
| - "dir/g.dart",
|
| - "dir/h.dart",
|
| - "dir/i.dart",
|
| - "dir/j.dart"
|
| - ];
|
| + "dir/a.dart",
|
| + "dir/b.dart",
|
| + "dir/c.dart",
|
| + "dir/d.dart",
|
| + "dir/e.dart",
|
| + "dir/f.dart",
|
| + "dir/g.dart",
|
| + "dir/h.dart",
|
| + "dir/i.dart",
|
| + "dir/j.dart"];
|
| expect(tree.fromFiles(files), equals("""
|
| '-- dir
|
| |-- a.dart
|
| @@ -44,21 +34,19 @@ main() {
|
| '-- j.dart
|
| """));
|
| });
|
| -
|
| test('files are elided if there are more than ten', () {
|
| var files = [
|
| - "dir/a.dart",
|
| - "dir/b.dart",
|
| - "dir/c.dart",
|
| - "dir/d.dart",
|
| - "dir/e.dart",
|
| - "dir/f.dart",
|
| - "dir/g.dart",
|
| - "dir/h.dart",
|
| - "dir/i.dart",
|
| - "dir/j.dart",
|
| - "dir/k.dart"
|
| - ];
|
| + "dir/a.dart",
|
| + "dir/b.dart",
|
| + "dir/c.dart",
|
| + "dir/d.dart",
|
| + "dir/e.dart",
|
| + "dir/f.dart",
|
| + "dir/g.dart",
|
| + "dir/h.dart",
|
| + "dir/i.dart",
|
| + "dir/j.dart",
|
| + "dir/k.dart"];
|
| expect(tree.fromFiles(files), equals("""
|
| '-- dir
|
| |-- a.dart
|
| @@ -70,21 +58,19 @@ main() {
|
| '-- k.dart
|
| """));
|
| });
|
| -
|
| test('files are not elided at the top level', () {
|
| var files = [
|
| - "a.dart",
|
| - "b.dart",
|
| - "c.dart",
|
| - "d.dart",
|
| - "e.dart",
|
| - "f.dart",
|
| - "g.dart",
|
| - "h.dart",
|
| - "i.dart",
|
| - "j.dart",
|
| - "k.dart"
|
| - ];
|
| + "a.dart",
|
| + "b.dart",
|
| + "c.dart",
|
| + "d.dart",
|
| + "e.dart",
|
| + "f.dart",
|
| + "g.dart",
|
| + "h.dart",
|
| + "i.dart",
|
| + "j.dart",
|
| + "k.dart"];
|
| expect(tree.fromFiles(files), equals("""
|
| |-- a.dart
|
| |-- b.dart
|
| @@ -99,32 +85,29 @@ main() {
|
| '-- k.dart
|
| """));
|
| });
|
| -
|
| test('a complex example', () {
|
| var files = [
|
| - "TODO",
|
| - "example/console_example.dart",
|
| - "example/main.dart",
|
| - "example/web copy/web_example.dart",
|
| - "test/absolute_test.dart",
|
| - "test/basename_test.dart",
|
| - "test/dirname_test.dart",
|
| - "test/extension_test.dart",
|
| - "test/is_absolute_test.dart",
|
| - "test/is_relative_test.dart",
|
| - "test/join_test.dart",
|
| - "test/normalize_test.dart",
|
| - "test/relative_test.dart",
|
| - "test/split_test.dart",
|
| - ".gitignore",
|
| - "README.md",
|
| - "lib/path.dart",
|
| - "pubspec.yaml",
|
| - "test/all_test.dart",
|
| - "test/path_posix_test.dart",
|
| - "test/path_windows_test.dart"
|
| - ];
|
| -
|
| + "TODO",
|
| + "example/console_example.dart",
|
| + "example/main.dart",
|
| + "example/web copy/web_example.dart",
|
| + "test/absolute_test.dart",
|
| + "test/basename_test.dart",
|
| + "test/dirname_test.dart",
|
| + "test/extension_test.dart",
|
| + "test/is_absolute_test.dart",
|
| + "test/is_relative_test.dart",
|
| + "test/join_test.dart",
|
| + "test/normalize_test.dart",
|
| + "test/relative_test.dart",
|
| + "test/split_test.dart",
|
| + ".gitignore",
|
| + "README.md",
|
| + "lib/path.dart",
|
| + "pubspec.yaml",
|
| + "test/all_test.dart",
|
| + "test/path_posix_test.dart",
|
| + "test/path_windows_test.dart"];
|
| expect(tree.fromFiles(files), equals("""
|
| |-- .gitignore
|
| |-- README.md
|
| @@ -148,12 +131,10 @@ main() {
|
| """));
|
| });
|
| });
|
| -
|
| group('treeFromMap', () {
|
| test('empty map', () {
|
| expect(tree.fromMap({}), equals(""));
|
| });
|
| -
|
| test('a complex example', () {
|
| var map = {
|
| ".gitignore": {},
|
| @@ -164,7 +145,7 @@ main() {
|
| "main.dart": {},
|
| "web copy": {
|
| "web_example.dart": {}
|
| - },
|
| + }
|
| },
|
| "lib": {
|
| "path.dart": {}
|
| @@ -183,7 +164,6 @@ main() {
|
| "split_test.dart": {}
|
| }
|
| };
|
| -
|
| expect(tree.fromMap(map), equals("""
|
| |-- .gitignore
|
| |-- README.md
|
| @@ -210,7 +190,6 @@ main() {
|
| """));
|
| });
|
| });
|
| -
|
| test('does not elide children if showAllChildren is true', () {
|
| var map = {
|
| 'dir': {
|
| @@ -225,7 +204,7 @@ main() {
|
| 'i.dart': {},
|
| 'j.dart': {},
|
| 'k.dart': {},
|
| - 'l.dart': {},
|
| + 'l.dart': {}
|
| }
|
| };
|
| expect(tree.fromMap(map, showAllChildren: true), equals("""
|
| @@ -244,5 +223,4 @@ main() {
|
| '-- l.dart
|
| """));
|
| });
|
| -
|
| }
|
|
|