File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ const String telemetryFlagPattern = r'^reporting=([0|1]) *$';
19
19
/// from the configuration file
20
20
///
21
21
/// Example:
22
- /// flutter-tools =2022-10-26,1
22
+ /// flutter_tools =2022-10-26,1
23
23
const String toolPattern =
24
- r'^([A-Za-z0-9]+-* [A-Za-z0-9 ]*)=([0-9]{4}-[0-9]{2}-[0-9]{2}),([0-9]+)$' ;
24
+ r'^([A-Za-z0-9]+[A-Za-z0-9_ ]*)=([0-9]{4}-[0-9]{2}-[0-9]{2}),([0-9]+)$' ;
25
25
26
26
class ConfigHandler {
27
27
/// Regex pattern implementation for matching a line in the config file
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ void main() {
30
30
late UserProperty userProperty;
31
31
32
32
const String homeDirName = 'home' ;
33
- const String initialToolName = 'initialTool ' ;
33
+ const String initialToolName = 'initial_tool ' ;
34
34
const String secondTool = 'newTool' ;
35
35
const String measurementId = 'measurementId' ;
36
36
const String apiSecret = 'apiSecret' ;
@@ -104,6 +104,10 @@ void main() {
104
104
'There should only be 4 files in the $kDartToolDirectoryName directory' );
105
105
expect (analytics.shouldShowMessage, true ,
106
106
reason: 'For the first run, analytics should default to being enabled' );
107
+ expect (configFile.readAsLinesSync ().length,
108
+ kConfigString.split ('\n ' ).length + 1 ,
109
+ reason: 'The number of lines should equal lines in constant value + 1 '
110
+ 'for the initialized tool' );
107
111
});
108
112
109
113
test ('New tool is successfully added to config file' , () {
You can’t perform that action at this time.
0 commit comments