This repository was archived by the owner on Nov 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -7,3 +7,5 @@ environment:
77 sdk : ' >=1.0.0 <2.0.0'
88dependencies :
99 which : ' >=0.1.2 <0.2.0'
10+ dev_dependencies :
11+ unittest : ' >=0.11.0 <0.12.0'
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
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.
4+
5+ import 'package:cli_util/cli_util.dart' ;
6+ import 'package:unittest/unittest.dart' ;
7+
8+ void defineTests () {
9+ group ('getSdkDir' , () {
10+ test ('arg parsing' , () {
11+ expect (getSdkDir (['--dart-sdk' , '/dart/sdk' ]).path, equals ('/dart/sdk' ));
12+ expect (getSdkDir (['--dart-sdk=/dart/sdk' ]).path, equals ('/dart/sdk' ));
13+ });
14+ });
15+ }
16+
17+ main () {
18+ groupSep = ' | ' ;
19+
20+ defineTests ();
21+ }
Original file line number Diff line number Diff line change 99
1010# Verify that the libraries are error free.
1111dartanalyzer --fatal-warnings \
12- lib/cli_util.dart
12+ lib/cli_util.dart \
13+ test/cli_util_test.dart
1314
1415# Run the tests.
15- # dart test/all .dart
16+ dart test/cli_util_test .dart
1617
1718# Install dart_coveralls; gather and send coverage data.
1819if [ " $COVERALLS_TOKEN " ]; then
@@ -21,5 +22,5 @@ if [ "$COVERALLS_TOKEN" ]; then
2122 --token $COVERALLS_TOKEN \
2223 --retry 2 \
2324 --exclude-test-files \
24- test/all .dart
25+ test/cli_util_test .dart
2526fi
You can’t perform that action at this time.
0 commit comments