Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Fix tests by ordering available scheme names.
Browse files Browse the repository at this point in the history
  • Loading branch information
ExtremeMan committed Oct 31, 2017
1 parent ff33fd7 commit e86dd01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions xctool/xctool-tests/XcodeSubjectInfoTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,13 @@ - (void)testUserDefinedSchemeIsReturnedWhenSharedOneWithTheSameNameExistsInProje
info.subjectWorkspace = projectPath;
info.subjectScheme = schemeName;
NSArray *schemes = [XcodeSubjectInfo schemePathsInContainer:projectPath];
assertThat(schemes, containsArray(@[
assertThat(schemes, containsInAnyOrder(
sharedSchemePath,
TEST_DATA @"TestProject-Library/TestProject-Library.xcodeproj/xcshareddata/xcschemes/Target Name With Spaces.xcscheme",
TEST_DATA @"TestProject-Library/TestProject-Library.xcodeproj/xcshareddata/xcschemes/TestProject-Library.xcscheme",
userSchemePath
]));
userSchemePath,
nil
));

assertThat([info matchingSchemePathForWorkspace], equalTo(userSchemePath));

Expand Down
2 changes: 1 addition & 1 deletion xctool/xctool/Options.m
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ - (BOOL)validateAndReturnXcodeSubjectInfo:(XcodeSubjectInfo **)xcodeSubjectInfoO
*errorMessage = [NSString stringWithFormat:
@"Can't find scheme '%@'.\n\nPossible schemes include:\n %@",
_scheme,
[schemeNames componentsJoinedByString:@"\n "]];
[[schemeNames sortedArrayUsingSelector:@selector(compare:)] componentsJoinedByString:@"\n "]];

if (!automaticSchemeCreationDisabled) {
*errorMessage = [*errorMessage stringByAppendingString:schemeCreationTip];
Expand Down

0 comments on commit e86dd01

Please sign in to comment.