parse build version on xcodeproj (#105908)

This commit is contained in:
Jesús S Guerrero
2022-06-16 15:26:06 -07:00
committed by GitHub
parent ddeb0b99c5
commit 32b22b85de
6 changed files with 26 additions and 3 deletions

View File

@@ -146,6 +146,7 @@ void main() {
]);
expect(xcodeProjectInterpreter.version, Version(11, 4, 1));
expect(xcodeProjectInterpreter.build, '11N111s');
expect(fakeProcessManager, hasNoRemainingExpectations);
});
@@ -173,6 +174,7 @@ void main() {
),
]);
expect(xcodeProjectInterpreter.version, isNull);
expect(xcodeProjectInterpreter.build, isNull);
expect(fakeProcessManager, hasNoRemainingExpectations);
});

View File

@@ -183,11 +183,12 @@ void main() {
final XcodeValidator validator = XcodeValidator(xcode: xcode, userMessages: UserMessages());
final ValidationResult result = await validator.validate();
expect(result.type, ValidationType.installed);
expect(result.messages.length, 1);
expect(result.messages.length, 2);
final ValidationMessage firstMessage = result.messages.first;
expect(firstMessage.type, ValidationMessageType.information);
expect(firstMessage.message, 'Xcode at /Library/Developer/CommandLineTools');
expect(result.statusInfo, '1000.0.0');
expect(result.messages[1].message, 'Build 13C100');
});
});
}

View File

@@ -296,6 +296,9 @@ class FakeXcodeProjectInterpreter implements XcodeProjectInterpreter {
@override
Version get version => Version(13, null, null);
@override
String get build => '13C100';
@override
Future<Map<String, String>> getBuildSettings(
String projectPath, {