zerg_xcode 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +2 -0
- data/Manifest +22 -14
- data/Rakefile +6 -0
- data/lib/zerg_xcode.rb +8 -3
- data/lib/zerg_xcode/builder/runner.rb +51 -0
- data/lib/zerg_xcode/builder/sdks.rb +34 -0
- data/lib/zerg_xcode/file_format/archiver.rb +15 -2
- data/lib/zerg_xcode/file_format/encoder.rb +15 -2
- data/lib/zerg_xcode/file_format/lexer.rb +15 -2
- data/lib/zerg_xcode/file_format/parser.rb +15 -2
- data/lib/zerg_xcode/file_format/paths.rb +15 -2
- data/lib/zerg_xcode/objects/pbx_build_file.rb +16 -3
- data/lib/zerg_xcode/objects/pbx_build_phase.rb +14 -2
- data/lib/zerg_xcode/objects/pbx_container_item_proxy.rb +14 -2
- data/lib/zerg_xcode/objects/pbx_group.rb +43 -3
- data/lib/zerg_xcode/objects/pbx_native_target.rb +15 -3
- data/lib/zerg_xcode/objects/pbx_project.rb +20 -4
- data/lib/zerg_xcode/objects/pbx_target_dependency.rb +15 -3
- data/lib/zerg_xcode/objects/xc_configuration_list.rb +14 -2
- data/lib/zerg_xcode/objects/xcode_object.rb +14 -3
- data/lib/zerg_xcode/plugins/addlibrary.rb +15 -2
- data/lib/zerg_xcode/plugins/core/core.rb +15 -6
- data/lib/zerg_xcode/plugins/help.rb +15 -2
- data/lib/zerg_xcode/plugins/import.rb +15 -2
- data/lib/zerg_xcode/plugins/irb.rb +16 -2
- data/lib/zerg_xcode/plugins/ls.rb +15 -2
- data/lib/zerg_xcode/plugins/lstargets.rb +16 -2
- data/lib/zerg_xcode/plugins/retarget.rb +15 -2
- data/lib/zerg_xcode/shortcuts.rb +10 -2
- data/test/builder/runner_test.rb +35 -0
- data/test/builder/sdk_test.rb +17 -0
- data/test/file_format/archiver_test.rb +6 -2
- data/test/file_format/encoder_test.rb +7 -3
- data/test/file_format/lexer_test.rb +7 -3
- data/test/file_format/parser_test.rb +6 -2
- data/test/file_format/path_test.rb +30 -24
- data/test/fixtures/ClosedLib/ClosedLib.xcodeproj/project.pbxproj +225 -0
- data/test/fixtures/ClosedLib/ClosedLib_Prefix.pch +7 -0
- data/test/fixtures/ClosedLib/ClosedNative.c +20 -0
- data/test/fixtures/ClosedLib/ClosedNative.h +12 -0
- data/{testdata → test/fixtures}/FlatTestApp/FlatTestApp.xcodeproj/project.pbxproj +0 -0
- data/{testdata → test/fixtures}/TestApp/TestApp.xcodeproj/project.pbxproj +0 -0
- data/{testdata → test/fixtures}/TestApp30.xcodeproj/project.pbxproj +0 -0
- data/{testdata → test/fixtures}/TestLib30.xcodeproj/project.pbxproj +0 -0
- data/{testdata → test/fixtures}/ZergSupport.xcodeproj/project.pbxproj +0 -0
- data/{testdata → test/fixtures}/project.pbxproj +0 -0
- data/{testdata → test/fixtures}/project.pbxproj.compat +0 -0
- data/test/objects/pbx_build_file_test.rb +7 -4
- data/test/objects/pbx_build_phase_test.rb +5 -2
- data/test/objects/pbx_container_item_proxy_test.rb +6 -2
- data/test/objects/pbx_group_test.rb +35 -3
- data/test/objects/pbx_native_target_test.rb +5 -2
- data/test/objects/pbx_project_test.rb +21 -9
- data/test/objects/pbx_target_dependency_test.rb +6 -2
- data/test/objects/xc_configuration_list_test.rb +5 -2
- data/test/objects/xcode_object_test.rb +5 -2
- data/test/plugins/addlibrary_test.rb +6 -3
- data/test/plugins/core/core_test.rb +5 -2
- data/test/plugins/helper.rb +4 -0
- data/test/plugins/import_test.rb +76 -72
- data/test/plugins/irb_test.rb +9 -4
- data/test/plugins/ls_test.rb +7 -4
- data/test/plugins/lstargets_test.rb +7 -4
- data/test/plugins/retarget_test.rb +7 -4
- data/test/shortcuts_test.rb +7 -3
- data/zerg_xcode.gemspec +6 -6
- metadata +32 -20
@@ -1,12 +1,16 @@
|
|
1
|
-
|
1
|
+
# Author:: Victor Costan
|
2
|
+
# Copyright:: Copyright (C) 2009 Zergling.Net
|
3
|
+
# License:: MIT
|
2
4
|
|
3
5
|
require 'zerg_xcode'
|
6
|
+
require 'test/unit'
|
4
7
|
|
5
8
|
class PBXContainerItemProxyTest < Test::Unit::TestCase
|
6
9
|
PBXContainerItemProxy = ZergXcode::Objects::PBXContainerItemProxy
|
7
10
|
|
8
11
|
def setup
|
9
|
-
@project = ZergXcode.load
|
12
|
+
@project = ZergXcode.load(
|
13
|
+
'test/fixtures/ZergSupport.xcodeproj/project.pbxproj')
|
10
14
|
@proxy = @project['targets'][2]['dependencies'].first['targetProxy']
|
11
15
|
@target = @project['targets'][1]
|
12
16
|
end
|
@@ -1,12 +1,44 @@
|
|
1
|
-
|
1
|
+
# Author:: Christopher Garrett
|
2
|
+
# Copyright:: Copyright (C) 2009 Zergling.Net
|
3
|
+
# License:: MIT
|
2
4
|
|
3
5
|
require 'zerg_xcode'
|
6
|
+
require 'test/unit'
|
4
7
|
|
5
8
|
class PBXGroupTest < Test::Unit::TestCase
|
6
9
|
PBXGroup = ZergXcode::Objects::PBXGroup
|
7
10
|
|
11
|
+
def setup
|
12
|
+
@proj = ZergXcode.load 'test/fixtures/project.pbxproj'
|
13
|
+
@main_group = @proj['mainGroup']
|
14
|
+
end
|
15
|
+
|
8
16
|
def test_instantiation
|
9
|
-
|
10
|
-
assert_equal PBXGroup, proj['mainGroup'].class
|
17
|
+
assert_equal PBXGroup, @main_group.class
|
11
18
|
end
|
19
|
+
|
20
|
+
def test_find_group_named
|
21
|
+
found_group = @main_group.find_group_named 'Classes'
|
22
|
+
assert_not_nil found_group
|
23
|
+
assert_equal PBXGroup, found_group.class
|
24
|
+
assert_equal 'Classes', found_group.xref_name
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_create_group
|
28
|
+
assert_nil @main_group.find_group_named('Foo'), 'Found inexistent group Foo'
|
29
|
+
|
30
|
+
created_group = @main_group.create_group 'Foo'
|
31
|
+
assert_not_nil created_group, 'Newly created group Foo'
|
32
|
+
assert_not_nil created_group.children,
|
33
|
+
"Newly created group's children attribute"
|
34
|
+
|
35
|
+
new_group = @main_group.find_group_named 'Foo'
|
36
|
+
assert_not_nil new_group, 'Did not find group Foo after creating it'
|
37
|
+
|
38
|
+
# Should return the existing group if it is already there
|
39
|
+
assert_operator created_group, :equal?, @main_group.create_group('Foo'),
|
40
|
+
"create_group should return an existing group if it's there"
|
41
|
+
|
42
|
+
assert_equal "<group>", new_group["sourceTree"]
|
43
|
+
end
|
12
44
|
end
|
@@ -1,6 +1,9 @@
|
|
1
|
-
|
1
|
+
# Author:: Victor Costan
|
2
|
+
# Copyright:: Copyright (C) 2009 Zergling.Net
|
3
|
+
# License:: MIT
|
2
4
|
|
3
5
|
require 'zerg_xcode'
|
6
|
+
require 'test/unit'
|
4
7
|
|
5
8
|
class PBXNativeTargetTest < Test::Unit::TestCase
|
6
9
|
PBXNativeTarget = ZergXcode::Objects::PBXNativeTarget
|
@@ -20,7 +23,7 @@ class PBXNativeTargetTest < Test::Unit::TestCase
|
|
20
23
|
"System/Library/Frameworks/CoreGraphics.framework"],
|
21
24
|
]
|
22
25
|
|
23
|
-
project = ZergXcode.load('
|
26
|
+
project = ZergXcode.load('test/fixtures/project.pbxproj')
|
24
27
|
assert_equal PBXNativeTarget, project['targets'].first.class
|
25
28
|
files = project['targets'].first.all_files
|
26
29
|
file_list = files.map do |file|
|
@@ -1,6 +1,9 @@
|
|
1
|
-
|
1
|
+
# Author:: Victor Costan
|
2
|
+
# Copyright:: Copyright (C) 2009 Zergling.Net
|
3
|
+
# License:: MIT
|
2
4
|
|
3
5
|
require 'zerg_xcode'
|
6
|
+
require 'test/unit'
|
4
7
|
|
5
8
|
require 'rubygems'
|
6
9
|
require 'flexmock/test_unit'
|
@@ -8,6 +11,7 @@ require 'flexmock/test_unit'
|
|
8
11
|
|
9
12
|
class PBXProjectTest < Test::Unit::TestCase
|
10
13
|
PBXProject = ZergXcode::Objects::PBXProject
|
14
|
+
PBXGroup = ZergXcode::Objects::PBXGroup
|
11
15
|
def test_all_files_small
|
12
16
|
golden_list = [
|
13
17
|
["./Classes/TestAppAppDelegate.h", "sourcecode.c.h"],
|
@@ -28,7 +32,7 @@ class PBXProjectTest < Test::Unit::TestCase
|
|
28
32
|
["BUILT_PRODUCTS_DIR/TestApp.app", nil],
|
29
33
|
]
|
30
34
|
|
31
|
-
project = ZergXcode.load('
|
35
|
+
project = ZergXcode.load('test/fixtures/project.pbxproj')
|
32
36
|
assert_equal PBXProject, project.class
|
33
37
|
files = project.all_files
|
34
38
|
file_list = files.map { |f| [f[:path], f[:object]['lastKnownFileType']] }
|
@@ -45,7 +49,7 @@ class PBXProjectTest < Test::Unit::TestCase
|
|
45
49
|
["./ZergSupport/TestSupport/GTM/GTMDefines.h", "sourcecode.c.h"],
|
46
50
|
["./ZergSupport/WebSupport/ZNHttpRequest.m", "sourcecode.c.objc"],
|
47
51
|
]
|
48
|
-
files = ZergXcode.load('
|
52
|
+
files = ZergXcode.load('test/fixtures/ZergSupport').all_files
|
49
53
|
file_list = files.map { |f| [f[:path], f[:object]['lastKnownFileType']] }
|
50
54
|
golden_entries.each do |entry|
|
51
55
|
assert file_list.include?(entry), "Missing #{entry.inspect}"
|
@@ -53,27 +57,35 @@ class PBXProjectTest < Test::Unit::TestCase
|
|
53
57
|
end
|
54
58
|
|
55
59
|
def test_save
|
56
|
-
project = ZergXcode.load('
|
60
|
+
project = ZergXcode.load('test/fixtures')
|
57
61
|
flexmock(ZergXcode).should_receive(:dump).
|
58
|
-
with(project, '
|
62
|
+
with(project, 'test/fixtures/project.pbxproj').
|
59
63
|
and_return(nil)
|
60
64
|
project.save!
|
61
65
|
end
|
62
66
|
|
63
67
|
def test_root_path
|
64
|
-
project = ZergXcode.load('
|
65
|
-
assert_equal '
|
68
|
+
project = ZergXcode.load('test/fixtures/ZergSupport.xcodeproj')
|
69
|
+
assert_equal 'test/fixtures', project.root_path
|
66
70
|
end
|
67
71
|
|
68
72
|
def test_copy_metadata
|
69
|
-
project = ZergXcode.load('
|
73
|
+
project = ZergXcode.load('test/fixtures/ZergSupport.xcodeproj')
|
70
74
|
clone = ZergXcode::XcodeObject.from project
|
71
75
|
|
72
76
|
assert_equal project.source_filename, clone.source_filename
|
73
77
|
end
|
74
78
|
|
75
79
|
def test_xref_name
|
76
|
-
project = ZergXcode.load('
|
80
|
+
project = ZergXcode.load('test/fixtures/project.pbxproj')
|
77
81
|
assert_equal 'PBXProject', project.xref_name
|
78
82
|
end
|
83
|
+
|
84
|
+
def test_find_group_named
|
85
|
+
project = ZergXcode.load('test/fixtures/project.pbxproj')
|
86
|
+
found_group = project.find_group_named("Classes")
|
87
|
+
assert_not_nil found_group
|
88
|
+
assert_equal PBXGroup, found_group.class
|
89
|
+
assert_equal "Classes", found_group.xref_name
|
90
|
+
end
|
79
91
|
end
|
@@ -1,12 +1,16 @@
|
|
1
|
-
|
1
|
+
# Author:: Victor Costan
|
2
|
+
# Copyright:: Copyright (C) 2009 Zergling.Net
|
3
|
+
# License:: MIT
|
2
4
|
|
3
5
|
require 'zerg_xcode'
|
6
|
+
require 'test/unit'
|
4
7
|
|
5
8
|
class PBXTargetDependencyTest < Test::Unit::TestCase
|
6
9
|
PBXTargetDependency = ZergXcode::Objects::PBXTargetDependency
|
7
10
|
|
8
11
|
def setup
|
9
|
-
@project = ZergXcode.load
|
12
|
+
@project = ZergXcode.load(
|
13
|
+
'test/fixtures/ZergSupport.xcodeproj/project.pbxproj')
|
10
14
|
@dependency = @project['targets'][2]['dependencies'].first
|
11
15
|
@target = @project['targets'][1]
|
12
16
|
end
|
@@ -1,12 +1,15 @@
|
|
1
|
-
|
1
|
+
# Author:: Victor Costan
|
2
|
+
# Copyright:: Copyright (C) 2009 Zergling.Net
|
3
|
+
# License:: MIT
|
2
4
|
|
3
5
|
require 'zerg_xcode'
|
6
|
+
require 'test/unit'
|
4
7
|
|
5
8
|
class XCConfigurationListTest < Test::Unit::TestCase
|
6
9
|
XCConfigurationList = ZergXcode::Objects::XCConfigurationList
|
7
10
|
|
8
11
|
def test_xref_name
|
9
|
-
proj = ZergXcode.load '
|
12
|
+
proj = ZergXcode.load 'test/fixtures/project.pbxproj'
|
10
13
|
list = proj['buildConfigurationList']
|
11
14
|
assert_equal XCConfigurationList, list.class
|
12
15
|
assert_equal 'XCConfigurationList', list.xref_name
|
@@ -1,7 +1,10 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# Author:: Victor Costan
|
2
|
+
# Copyright:: Copyright (C) 2009 Zergling.Net
|
3
|
+
# License:: MIT
|
3
4
|
|
4
5
|
require 'zerg_xcode'
|
6
|
+
require 'set'
|
7
|
+
require 'test/unit'
|
5
8
|
|
6
9
|
class ObjectTest < Test::Unit::TestCase
|
7
10
|
XcodeObject = ZergXcode::XcodeObject
|
@@ -1,7 +1,10 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# Author:: Victor Costan
|
2
|
+
# Copyright:: Copyright (C) 2009 Zergling.Net
|
3
|
+
# License:: MIT
|
3
4
|
|
4
5
|
require 'zerg_xcode'
|
6
|
+
require 'test/unit'
|
7
|
+
require 'test/plugins/helper.rb'
|
5
8
|
|
6
9
|
module Plugins; end
|
7
10
|
|
@@ -11,7 +14,7 @@ class Plugins::AddlibraryTest < Test::Unit::TestCase
|
|
11
14
|
def setup
|
12
15
|
super
|
13
16
|
@plugin = ZergXcode.plugin 'addlibrary'
|
14
|
-
@project = ZergXcode.load '
|
17
|
+
@project = ZergXcode.load 'test/fixtures/ZergSupport'
|
15
18
|
|
16
19
|
@lib, @test_lib, @test_app = *@project['targets']
|
17
20
|
end
|
@@ -1,9 +1,12 @@
|
|
1
|
+
# Author:: Victor Costan
|
2
|
+
# Copyright:: Copyright (C) 2009 Zergling.Net
|
3
|
+
# License:: MIT
|
4
|
+
|
5
|
+
require 'zerg_xcode'
|
1
6
|
require 'stringio'
|
2
7
|
require 'test/unit'
|
3
8
|
require 'test/plugins/helper.rb'
|
4
9
|
|
5
|
-
require 'zerg_xcode'
|
6
|
-
|
7
10
|
class Plugins::CoreTest < Test::Unit::TestCase
|
8
11
|
include Plugins::TestHelper
|
9
12
|
|
data/test/plugins/helper.rb
CHANGED
data/test/plugins/import_test.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# Author:: Victor Costan
|
2
|
+
# Copyright:: Copyright (C) 2009 Zergling.Net
|
3
|
+
# License:: MIT
|
3
4
|
|
4
5
|
require 'zerg_xcode'
|
6
|
+
require 'test/unit'
|
7
|
+
require 'test/plugins/helper.rb'
|
5
8
|
|
6
9
|
require 'rubygems'
|
7
10
|
require 'flexmock/test_unit'
|
@@ -17,34 +20,34 @@ class Plugins::ImportTest < Test::Unit::TestCase
|
|
17
20
|
end
|
18
21
|
|
19
22
|
def test_import_identical_small
|
20
|
-
project = ZergXcode.load '
|
23
|
+
project = ZergXcode.load 'test/fixtures/TestApp'
|
21
24
|
assert_import_identical project
|
22
25
|
end
|
23
26
|
|
24
27
|
def test_import_identical_large
|
25
|
-
project = ZergXcode.load '
|
28
|
+
project = ZergXcode.load 'test/fixtures/ZergSupport'
|
26
29
|
assert_import_identical project
|
27
30
|
end
|
28
31
|
|
29
32
|
def test_import_identical_30app
|
30
|
-
project = ZergXcode.load '
|
33
|
+
project = ZergXcode.load 'test/fixtures/TestApp30'
|
31
34
|
assert_import_identical project
|
32
35
|
end
|
33
36
|
|
34
37
|
def test_import_identical_30lib
|
35
|
-
project = ZergXcode.load '
|
38
|
+
project = ZergXcode.load 'test/fixtures/TestApp30'
|
36
39
|
assert_import_identical project
|
37
40
|
end
|
38
41
|
|
39
42
|
def test_import_differents
|
40
|
-
small = ZergXcode.load '
|
41
|
-
large = ZergXcode.load '
|
43
|
+
small = ZergXcode.load 'test/fixtures/TestApp'
|
44
|
+
large = ZergXcode.load 'test/fixtures/ZergSupport'
|
42
45
|
assert_import_differents small, large
|
43
46
|
end
|
44
47
|
|
45
48
|
def test_import_differents_30
|
46
|
-
small = ZergXcode.load '
|
47
|
-
large = ZergXcode.load '
|
49
|
+
small = ZergXcode.load 'test/fixtures/TestApp30'
|
50
|
+
large = ZergXcode.load 'test/fixtures/TestLib30'
|
48
51
|
assert_import_differents small, large
|
49
52
|
end
|
50
53
|
|
@@ -102,7 +105,7 @@ class Plugins::ImportTest < Test::Unit::TestCase
|
|
102
105
|
end
|
103
106
|
|
104
107
|
def test_bin_mappings
|
105
|
-
proj = ZergXcode.load '
|
108
|
+
proj = ZergXcode.load 'test/fixtures/TestApp'
|
106
109
|
mappings = @plugin.cross_reference proj, ZergXcode::XcodeObject.from(proj)
|
107
110
|
|
108
111
|
bins = @plugin.bin_mappings mappings, proj
|
@@ -120,22 +123,22 @@ class Plugins::ImportTest < Test::Unit::TestCase
|
|
120
123
|
end
|
121
124
|
|
122
125
|
def test_cross_reference_identical_small
|
123
|
-
project = ZergXcode.load '
|
126
|
+
project = ZergXcode.load 'test/fixtures/TestApp'
|
124
127
|
assert_cross_reference_covers_project project
|
125
128
|
end
|
126
129
|
|
127
130
|
def test_cross_reference_identical_large
|
128
|
-
project = ZergXcode.load '
|
131
|
+
project = ZergXcode.load 'test/fixtures/ZergSupport'
|
129
132
|
assert_cross_reference_covers_project project
|
130
133
|
end
|
131
134
|
|
132
135
|
def test_cross_reference_identical_30app
|
133
|
-
project = ZergXcode.load '
|
136
|
+
project = ZergXcode.load 'test/fixtures/TestApp30'
|
134
137
|
assert_cross_reference_covers_project project
|
135
138
|
end
|
136
139
|
|
137
140
|
def test_cross_reference_identical_30lib
|
138
|
-
project = ZergXcode.load '
|
141
|
+
project = ZergXcode.load 'test/fixtures/TestLib30'
|
139
142
|
assert_cross_reference_covers_project project
|
140
143
|
end
|
141
144
|
|
@@ -159,26 +162,27 @@ class Plugins::ImportTest < Test::Unit::TestCase
|
|
159
162
|
end
|
160
163
|
|
161
164
|
def test_execute_file_ops
|
162
|
-
ops = [{ :op => :delete, :path => '
|
165
|
+
ops = [{ :op => :delete, :path => 'test/fixtures/junk.m' },
|
163
166
|
{ :op => :copy, :from => 'test/awesome.m',
|
164
|
-
:to => '
|
167
|
+
:to => 'test/fixtures/NewDir/awesome.m' },
|
165
168
|
{ :op => :copy, :from => 'test/ghost.m',
|
166
|
-
:to => '
|
169
|
+
:to => 'test/fixtures/Dir/ghost.m' },
|
167
170
|
]
|
168
|
-
flexmock(File).should_receive(:exist?).with('
|
171
|
+
flexmock(File).should_receive(:exist?).with('test/fixtures/junk.m').
|
169
172
|
and_return(true)
|
170
|
-
flexmock(FileUtils).should_receive(:rm_r).with('
|
173
|
+
flexmock(FileUtils).should_receive(:rm_r).with('test/fixtures/junk.m').
|
171
174
|
and_return(nil)
|
172
|
-
flexmock(File).should_receive(:exist?).with('
|
175
|
+
flexmock(File).should_receive(:exist?).with('test/fixtures/NewDir').
|
173
176
|
and_return(false)
|
174
|
-
flexmock(FileUtils).should_receive(:mkdir_p).with('
|
177
|
+
flexmock(FileUtils).should_receive(:mkdir_p).with('test/fixtures/NewDir').
|
175
178
|
and_return(nil)
|
176
179
|
flexmock(File).should_receive(:exist?).with('test/awesome.m').
|
177
180
|
and_return(true)
|
178
181
|
flexmock(FileUtils).should_receive(:cp_r).
|
179
|
-
with('test/awesome.m',
|
182
|
+
with('test/awesome.m',
|
183
|
+
'test/fixtures/NewDir/awesome.m').
|
180
184
|
and_return(nil)
|
181
|
-
flexmock(File).should_receive(:exist?).with('
|
185
|
+
flexmock(File).should_receive(:exist?).with('test/fixtures/Dir').
|
182
186
|
and_return(true)
|
183
187
|
flexmock(File).should_receive(:exist?).with('test/ghost.m').
|
184
188
|
and_return(false)
|
@@ -188,32 +192,32 @@ class Plugins::ImportTest < Test::Unit::TestCase
|
|
188
192
|
end
|
189
193
|
|
190
194
|
def test_import_file_ops_flatten
|
191
|
-
small = ZergXcode.load '
|
192
|
-
flat = ZergXcode.load '
|
195
|
+
small = ZergXcode.load 'test/fixtures/TestApp'
|
196
|
+
flat = ZergXcode.load 'test/fixtures/FlatTestApp'
|
193
197
|
|
194
198
|
golden_ops = [
|
195
|
-
['delete', '
|
196
|
-
['delete', '
|
197
|
-
['delete', '
|
198
|
-
['delete', '
|
199
|
-
['copy', '
|
200
|
-
'
|
201
|
-
['copy', '
|
202
|
-
'
|
203
|
-
['copy', '
|
204
|
-
'
|
205
|
-
['copy', '
|
206
|
-
'
|
207
|
-
['copy', '
|
208
|
-
'
|
209
|
-
['copy', '
|
210
|
-
'
|
211
|
-
['copy', '
|
212
|
-
'
|
213
|
-
['copy', '
|
214
|
-
'
|
215
|
-
['copy', '
|
216
|
-
'
|
199
|
+
['delete', 'test/fixtures/TestApp/Classes/TestAppAppDelegate.h', '*'],
|
200
|
+
['delete', 'test/fixtures/TestApp/Classes/TestAppAppDelegate.m', '*'],
|
201
|
+
['delete', 'test/fixtures/TestApp/Classes/TestAppViewController.h', '*'],
|
202
|
+
['delete', 'test/fixtures/TestApp/Classes/TestAppViewController.m', '*'],
|
203
|
+
['copy', 'test/fixtures/TestApp/TestAppAppDelegate.h',
|
204
|
+
'test/fixtures/FlatTestApp/TestAppAppDelegate.h'],
|
205
|
+
['copy', 'test/fixtures/TestApp/TestAppAppDelegate.m',
|
206
|
+
'test/fixtures/FlatTestApp/TestAppAppDelegate.m'],
|
207
|
+
['copy', 'test/fixtures/TestApp/TestAppViewController.h',
|
208
|
+
'test/fixtures/FlatTestApp/TestAppViewController.h'],
|
209
|
+
['copy', 'test/fixtures/TestApp/TestAppViewController.m',
|
210
|
+
'test/fixtures/FlatTestApp/TestAppViewController.m'],
|
211
|
+
['copy', 'test/fixtures/TestApp/TestApp_Prefix.pch',
|
212
|
+
'test/fixtures/FlatTestApp/TestApp_Prefix.pch'],
|
213
|
+
['copy', 'test/fixtures/TestApp/main.m',
|
214
|
+
'test/fixtures/FlatTestApp/main.m'],
|
215
|
+
['copy', 'test/fixtures/TestApp/TestAppViewController.xib',
|
216
|
+
'test/fixtures/FlatTestApp/TestAppViewController.xib'],
|
217
|
+
['copy', 'test/fixtures/TestApp/MainWindow.xib',
|
218
|
+
'test/fixtures/FlatTestApp/MainWindow.xib'],
|
219
|
+
['copy', 'test/fixtures/TestApp/Info.plist',
|
220
|
+
'test/fixtures/FlatTestApp/Info.plist'],
|
217
221
|
]
|
218
222
|
|
219
223
|
|
@@ -225,32 +229,32 @@ class Plugins::ImportTest < Test::Unit::TestCase
|
|
225
229
|
end
|
226
230
|
|
227
231
|
def test_import_file_ops_branch
|
228
|
-
small = ZergXcode.load '
|
229
|
-
flat = ZergXcode.load '
|
232
|
+
small = ZergXcode.load 'test/fixtures/TestApp'
|
233
|
+
flat = ZergXcode.load 'test/fixtures/FlatTestApp'
|
230
234
|
|
231
235
|
golden_ops = [
|
232
|
-
['delete', '
|
233
|
-
['delete', '
|
234
|
-
['delete', '
|
235
|
-
['delete', '
|
236
|
-
['copy', '
|
237
|
-
'
|
238
|
-
['copy', '
|
239
|
-
'
|
240
|
-
['copy', '
|
241
|
-
'
|
242
|
-
['copy', '
|
243
|
-
'
|
244
|
-
['copy', '
|
245
|
-
'
|
246
|
-
['copy', '
|
247
|
-
'
|
248
|
-
['copy', '
|
249
|
-
'
|
250
|
-
['copy', '
|
251
|
-
'
|
252
|
-
['copy', '
|
253
|
-
'
|
236
|
+
['delete', 'test/fixtures/FlatTestApp/TestAppAppDelegate.h', '*'],
|
237
|
+
['delete', 'test/fixtures/FlatTestApp/TestAppAppDelegate.m', '*'],
|
238
|
+
['delete', 'test/fixtures/FlatTestApp/TestAppViewController.h', '*'],
|
239
|
+
['delete', 'test/fixtures/FlatTestApp/TestAppViewController.m', '*'],
|
240
|
+
['copy', 'test/fixtures/FlatTestApp/Classes/TestAppAppDelegate.h',
|
241
|
+
'test/fixtures/TestApp/Classes/TestAppAppDelegate.h'],
|
242
|
+
['copy', 'test/fixtures/FlatTestApp/Classes/TestAppAppDelegate.m',
|
243
|
+
'test/fixtures/TestApp/Classes/TestAppAppDelegate.m'],
|
244
|
+
['copy', 'test/fixtures/FlatTestApp/Classes/TestAppViewController.h',
|
245
|
+
'test/fixtures/TestApp/Classes/TestAppViewController.h'],
|
246
|
+
['copy', 'test/fixtures/FlatTestApp/Classes/TestAppViewController.m',
|
247
|
+
'test/fixtures/TestApp/Classes/TestAppViewController.m'],
|
248
|
+
['copy', 'test/fixtures/FlatTestApp/TestApp_Prefix.pch',
|
249
|
+
'test/fixtures/TestApp/TestApp_Prefix.pch'],
|
250
|
+
['copy', 'test/fixtures/FlatTestApp/main.m',
|
251
|
+
'test/fixtures/TestApp/main.m'],
|
252
|
+
['copy', 'test/fixtures/FlatTestApp/TestAppViewController.xib',
|
253
|
+
'test/fixtures/TestApp/TestAppViewController.xib'],
|
254
|
+
['copy', 'test/fixtures/FlatTestApp/MainWindow.xib',
|
255
|
+
'test/fixtures/TestApp/MainWindow.xib'],
|
256
|
+
['copy', 'test/fixtures/FlatTestApp/Info.plist',
|
257
|
+
'test/fixtures/TestApp/Info.plist'],
|
254
258
|
]
|
255
259
|
|
256
260
|
file_ops = @plugin.import_project! small, flat
|