-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add xcodebuild command
destination
flag (#147)
- Loading branch information
1 parent
5ca9efb
commit de280f5
Showing
6 changed files
with
242 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package utility | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/bitrise-io/go-xcode/xcodeproject/serialized" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestPlatformsMatching_iOS(t *testing.T) { | ||
buildSettings := serialized.Object{} | ||
buildSettings["SDKROOT"] = "iphoneos" | ||
|
||
platform, err := getPlatform(buildSettings) | ||
|
||
require.Equal(t, "iOS", string(platform)) | ||
require.Nil(t, err) | ||
} | ||
|
||
func TestPlatformsMatching_macOS(t *testing.T) { | ||
buildSettings := serialized.Object{} | ||
buildSettings["SDKROOT"] = "macosx" | ||
|
||
platform, err := getPlatform(buildSettings) | ||
|
||
require.Equal(t, "OS X", string(platform)) | ||
require.Nil(t, err) | ||
} | ||
|
||
func TestPlatformsMatching_fails(t *testing.T) { | ||
buildSettings := serialized.Object{} | ||
platform, err := getPlatform(buildSettings) | ||
|
||
require.Empty(t, platform) | ||
require.NotNil(t, err) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters