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

Unified Diff: utils/tests/pub/directory_tree_test.dart

Issue 11442068: A few small changes to the "pub lish" confirmation UI. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix tests. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/pub/directory_tree.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/directory_tree_test.dart
diff --git a/utils/tests/pub/directory_tree_test.dart b/utils/tests/pub/directory_tree_test.dart
index e9f892b215f46b8ab4d1ee57f4b7d6b9f22436cd..8a45a6fe2efb15592169035ed146fdef7ff82f73 100644
--- a/utils/tests/pub/directory_tree_test.dart
+++ b/utils/tests/pub/directory_tree_test.dart
@@ -14,33 +14,60 @@ main() {
test('up to ten files in one directory are shown', () {
var files = [
- "a.dart",
- "b.dart",
- "c.dart",
- "d.dart",
- "e.dart",
- "f.dart",
- "g.dart",
- "h.dart",
- "i.dart",
- "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(generateTree(files), equals("""
-|-- a.dart
-|-- b.dart
-|-- c.dart
-|-- d.dart
-|-- e.dart
-|-- f.dart
-|-- g.dart
-|-- h.dart
-|-- i.dart
-'-- j.dart
+'-- dir
+ |-- a.dart
+ |-- b.dart
+ |-- c.dart
+ |-- d.dart
+ |-- e.dart
+ |-- f.dart
+ |-- g.dart
+ |-- h.dart
+ |-- i.dart
+ '-- 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"
+ ];
+ expect(generateTree(files), equals("""
+'-- dir
+ |-- a.dart
+ |-- b.dart
+ |-- c.dart
+ | (5 more...)
+ |-- i.dart
+ |-- j.dart
+ '-- k.dart
+"""));
+ });
+
+ test('files are not elided at the top level', () {
+ var files = [
"a.dart",
"b.dart",
"c.dart",
@@ -57,7 +84,11 @@ main() {
|-- a.dart
|-- b.dart
|-- c.dart
-| (5 more...)
+|-- d.dart
+|-- e.dart
+|-- f.dart
+|-- g.dart
+|-- h.dart
|-- i.dart
|-- j.dart
'-- k.dart
@@ -105,7 +136,7 @@ main() {
|-- absolute_test.dart
|-- all_test.dart
|-- basename_test.dart
- | (7 more...)
+ | (7 more...)
|-- path_windows_test.dart
|-- relative_test.dart
'-- split_test.dart
« no previous file with comments | « utils/pub/directory_tree.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698