Commit ab4858d7 authored by Samuel Giddins's avatar Samuel Giddins

Update the unit tests for swift static lib changes

parent 052fe4eb
......@@ -606,6 +606,7 @@ module Pod
def create_module_map
return super unless custom_module_map
path = target.module_map_path
path.mkpath
UI.message "- Copying module map file to #{UI.path(path)}" do
Tempfile.open(path.basename.to_s) do |tmp_module_map|
contents = custom_module_map.read
......
......@@ -146,7 +146,7 @@ module Pod
end
it 'adds the sandbox public headers search paths to the xcconfig, with quotes, as system headers' do
expected = '$(inherited) -fmodule-map-file="${PODS_ROOT}/Target Support Files/BananaLib/BananaLib.modulemap" -isystem "${PODS_ROOT}/Headers/Public/BananaLib"'
expected = '$(inherited) -fmodule-map-file="${PODS_ROOT}/Headers/Private/BananaLib/BananaLib.modulemap" -isystem "${PODS_ROOT}/Headers/Public/BananaLib"'
@xcconfig.to_hash['OTHER_CFLAGS'].should == expected
end
......@@ -156,7 +156,7 @@ module Pod
end
it 'links the pod targets with the aggregate target' do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-l"BananaLib-Pods"'
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-l"BananaLib"'
end
end
......
......@@ -478,8 +478,8 @@ module Pod
group.children.map(&:display_name).sort.should == [
'BananaLib-Pods-SampleProject-dummy.m',
'BananaLib-Pods-SampleProject-prefix.pch',
'BananaLib-Pods-SampleProject.modulemap',
'BananaLib-Pods-SampleProject.xcconfig',
'BananaLib.modulemap',
]
end
......@@ -490,8 +490,8 @@ module Pod
group.children.map(&:display_name).sort.should == [
'BananaLib-Pods-SampleProject-dummy.m',
'BananaLib-Pods-SampleProject-prefix.pch',
'BananaLib-Pods-SampleProject.modulemap',
'BananaLib-Pods-SampleProject.xcconfig',
'BananaLib.modulemap',
]
end
......@@ -501,8 +501,8 @@ module Pod
group = @project['Pods/BananaLib/Support Files']
group.children.map(&:display_name).sort.should == [
'BananaLib-Pods-SampleProject-dummy.m',
'BananaLib-Pods-SampleProject.modulemap',
'BananaLib-Pods-SampleProject.xcconfig',
'BananaLib.modulemap',
]
end
......
......@@ -433,7 +433,7 @@ module Pod
end
it 'returns the library name' do
@target.static_library_name.should == 'libPods-iOS Example.a'
@target.static_library_name.should == 'libPods_iOS_Example.a'
end
it 'returns :framework as product type' do
......
......@@ -48,7 +48,7 @@ module Pod
it 'returns the name of its product' do
@pod_target.product_name.should == 'libBananaLib.a'
@pod_target.scoped.first.product_name.should == 'libBananaLib-Pods.a'
@pod_target.scoped.first.product_name.should == 'libBananaLib.a'
end
it 'returns the spec consumers for the pod targets' do
......@@ -225,9 +225,9 @@ module Pod
it 'returns the path for the CONFIGURATION_BUILD_DIR build setting' do
@pod_target.build_product_path.should == '${PODS_CONFIGURATION_BUILD_DIR}/BananaLib/libBananaLib.a'
@pod_target.scoped.first.build_product_path.should == '${PODS_CONFIGURATION_BUILD_DIR}/BananaLib-Pods/libBananaLib-Pods.a'
@pod_target.scoped.first.build_product_path.should == '${PODS_CONFIGURATION_BUILD_DIR}/BananaLib-Pods/libBananaLib.a'
@pod_target.build_product_path('$BUILT_PRODUCTS_DIR').should == '$BUILT_PRODUCTS_DIR/BananaLib/libBananaLib.a'
@pod_target.scoped.first.build_product_path('$BUILT_PRODUCTS_DIR').should == '$BUILT_PRODUCTS_DIR/BananaLib-Pods/libBananaLib-Pods.a'
@pod_target.scoped.first.build_product_path('$BUILT_PRODUCTS_DIR').should == '$BUILT_PRODUCTS_DIR/BananaLib-Pods/libBananaLib.a'
end
it 'returns prefix header path' do
......@@ -369,7 +369,7 @@ module Pod
it 'returns the library name' do
@pod_target.static_library_name.should == 'libBananaLib.a'
@pod_target.scoped.first.static_library_name.should == 'libBananaLib-Pods.a'
@pod_target.scoped.first.static_library_name.should == 'libBananaLib.a'
end
it 'returns :framework as product type' do
......@@ -388,7 +388,7 @@ module Pod
describe 'Host does not requires frameworks' do
it 'returns the product name' do
@pod_target.product_name.should == 'libBananaLib.a'
@pod_target.scoped.first.product_name.should == 'libBananaLib-Pods.a'
@pod_target.scoped.first.product_name.should == 'libBananaLib.a'
end
it 'returns the framework name' do
......@@ -397,7 +397,7 @@ module Pod
it 'returns the library name' do
@pod_target.static_library_name.should == 'libBananaLib.a'
@pod_target.scoped.first.static_library_name.should == 'libBananaLib-Pods.a'
@pod_target.scoped.first.static_library_name.should == 'libBananaLib.a'
end
it 'returns :static_library as product type' do
......@@ -434,7 +434,7 @@ module Pod
it 'returns the library name' do
@pod_target.static_library_name.should == 'libOrangeFramework.a'
@pod_target.scoped.first.static_library_name.should == 'libOrangeFramework-Pods.a'
@pod_target.scoped.first.static_library_name.should == 'libOrangeFramework.a'
end
it 'returns :framework as product type' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment