8
8
import 'dart:io' ;
9
9
10
10
import 'package:build_runner/src/build_script_generate/build_script_generate.dart' ;
11
- import 'package:build_runner_core/src/util/constants .dart' ;
11
+ import 'package:build_runner_core/build_runner_core .dart' ;
12
12
import 'package:path/path.dart' as p;
13
13
import 'package:test/test.dart' ;
14
14
@@ -54,10 +54,10 @@ void main() {
54
54
55
55
test ('rebuilds if the input file changes and not otherwise' , () async {
56
56
var result = await runBuild ();
57
- expect (result.stdout, contains ('with 0 outputs' ));
57
+ expect (result.stdout, contains ('wrote 0 outputs' ));
58
58
await replaceAllInFile ('lib/hello.txt' , 'hello' , 'goodbye' );
59
59
result = await runBuild ();
60
- expect (result.stdout, contains ('with 1 outputs ' ));
60
+ expect (result.stdout, contains ('wrote 1 output ' ));
61
61
var content = await readGeneratedFileAsString ('_test/lib/hello.txt.post' );
62
62
expect (content, contains ('goodbye' ));
63
63
});
@@ -70,7 +70,7 @@ void main() {
70
70
);
71
71
72
72
expect (result.exitCode, isNot (0 ));
73
- expect (result.stdout, contains ('Failed to precompile build script' ));
73
+ expect (result.stdout, contains ('Failed to compile build script' ));
74
74
expect (
75
75
result.stdout,
76
76
contains ('Unknown experiment: fake-experiment' ),
@@ -134,14 +134,13 @@ void main() {
134
134
expect (
135
135
(nextBuild.stdout as String ).split ('\n ' ),
136
136
containsAllInOrder ([
137
- contains ('Generating build script' ),
137
+ contains ('Generating the build script' ),
138
+ contains ('Compiling the build script.' ),
139
+ contains ('Creating the asset graph.' ),
138
140
contains (
139
- 'Invalidated precompiled build script due to missing asset '
140
- 'graph.' ,
141
+ 'Building, full build because there is no valid asset graph.' ,
141
142
),
142
- contains ('Precompiling build script' ),
143
- contains ('Building new asset graph.' ),
144
- contains ('Succeeded after' ),
143
+ contains (BuildLog .successPattern),
145
144
]),
146
145
);
147
146
});
0 commit comments