File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 22
22
expect_version ( xcconfig_mock_content : xcconfig_mock_content , expected_version : '6.30.1' )
23
23
end
24
24
25
+ it 'parses the xcconfig with keys without spacing and gets the public version' do
26
+ xcconfig_mock_content = <<~CONTENT
27
+ // a comment
28
+ VERSION_SHORT=6
29
+ VERSION_LONG=6.30.0
30
+ CONTENT
31
+
32
+ expect_version ( xcconfig_mock_content : xcconfig_mock_content , expected_version : '6.30' )
33
+ end
34
+
35
+ it 'parses the xcconfig with keys without spacing and gets the public hotfix version' do
36
+ xcconfig_mock_content = <<~CONTENT
37
+ VERSION_SHORT=6
38
+ // a comment
39
+ VERSION_LONG=6.30.1
40
+ CONTENT
41
+
42
+ expect_version ( xcconfig_mock_content : xcconfig_mock_content , expected_version : '6.30.1' )
43
+ end
44
+
45
+ it 'fails to extract the version from an xcconfig file with an invalid format' do
46
+ xcconfig_mock_content = <<~CONTENT
47
+ VERSION_SHORT = 6
48
+ VERSION_LONG 6.30.1
49
+ CONTENT
50
+
51
+ expect do
52
+ expect_version ( xcconfig_mock_content : xcconfig_mock_content , expected_version : 'n/a' )
53
+ end . to raise_error ( FastlaneCore ::Interface ::FastlaneError )
54
+ end
55
+
25
56
it 'throws an error when the file is not found' do
26
57
file_path = 'file/not/found'
27
58
You can’t perform that action at this time.
0 commit comments