2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
+ import 'package:path/path.dart' as p;
5
6
import 'package:test/test.dart' ;
6
7
7
8
import 'descriptor.dart' as d;
@@ -46,6 +47,7 @@ main() {
46
47
test ("in compact form" , () async {
47
48
await pubGet ();
48
49
await runPub (args: ['deps' , '-s' , 'compact' ], output: '''
50
+ Dart SDK 0.1.2+3
49
51
myapp 0.0.0
50
52
51
53
dependencies:
@@ -73,6 +75,7 @@ main() {
73
75
test ("in list form" , () async {
74
76
await pubGet ();
75
77
await runPub (args: ['deps' , '--style' , 'list' ], output: '''
78
+ Dart SDK 0.1.2+3
76
79
myapp 0.0.0
77
80
78
81
dependencies:
@@ -106,9 +109,10 @@ main() {
106
109
''' );
107
110
});
108
111
109
- test ("lists dependencies in tree form" , () async {
112
+ test ("in tree form" , () async {
110
113
await pubGet ();
111
114
await runPub (args: ['deps' ], output: '''
115
+ Dart SDK 0.1.2+3
112
116
myapp 0.0.0
113
117
|-- from_path 1.2.3
114
118
|-- normal 1.2.3
@@ -126,12 +130,23 @@ main() {
126
130
'-- myapp...
127
131
''' );
128
132
});
133
+
134
+ test ("with the Flutter SDK, if applicable" , () async {
135
+ await pubGet ();
136
+
137
+ await d.dir ('flutter' , [d.file ('version' , '4.3.2+1' )]).create ();
138
+ await runPub (
139
+ args: ['deps' ],
140
+ output: contains ('Flutter SDK 4.3.2+1' ),
141
+ environment: {"FLUTTER_ROOT" : p.join (d.sandbox, 'flutter' )});
142
+ });
129
143
});
130
144
131
145
group ("lists non-dev dependencies" , () {
132
146
test ("in compact form" , () async {
133
147
await pubGet ();
134
148
await runPub (args: ['deps' , '-s' , 'compact' , '--no-dev' ], output: '''
149
+ Dart SDK 0.1.2+3
135
150
myapp 0.0.0
136
151
137
152
dependencies:
@@ -155,6 +170,7 @@ main() {
155
170
test ("in list form" , () async {
156
171
await pubGet ();
157
172
await runPub (args: ['deps' , '--style' , 'list' , '--no-dev' ], output: '''
173
+ Dart SDK 0.1.2+3
158
174
myapp 0.0.0
159
175
160
176
dependencies:
@@ -185,6 +201,7 @@ main() {
185
201
test ("in tree form" , () async {
186
202
await pubGet ();
187
203
await runPub (args: ['deps' , '--no-dev' ], output: '''
204
+ Dart SDK 0.1.2+3
188
205
myapp 0.0.0
189
206
|-- from_path 1.2.3
190
207
|-- normal 1.2.3
0 commit comments