Skip to content

Commit 94a3e3c

Browse files
committed
Add test for rebuilding when pod version updates
1 parent 3290f93 commit 94a3e3c

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

test/change_podfile.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,39 @@ class A {
233233
"""
234234
)
235235

236+
def oldPodVersion():
237+
return (wrapper(
238+
"""
239+
pod "ReactiveSwift", "= 3.0.0", :binary => true
240+
""") ,
241+
"""
242+
import ReactiveSwift
243+
class A {
244+
// Works on 3.x but not 4.x
245+
let a = A.b(SignalProducer<Int, NSError>.empty)
246+
static func b<U: BindingSource>(_ b: U) -> Bool {
247+
return true
248+
}
249+
}
250+
"""
251+
)
252+
253+
def upgradePodVersion():
254+
return (wrapper(
255+
"""
256+
pod "ReactiveSwift", "= 4.0.0", :binary => true
257+
""") ,
258+
"""
259+
import ReactiveSwift
260+
class A {
261+
func b() {
262+
// Works on 4.x but not 3.x
263+
Lifetime.make().token.dispose()
264+
}
265+
}
266+
"""
267+
)
268+
236269

237270
if __name__ == "__main__":
238271
arg = sys.argv[1]

test/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build() {
77

88
rm -rf Pods
99

10-
cases=("initial" "addSwiftPod" "revertToSourceCode" "addDifferentNamePod" "addSubPod" "deleteAPod" "addVendoredLibPod" "universalFlag" "multiplePlatforms" "multiplePlatformsWithALLFlag")
10+
cases=("initial" "addSwiftPod" "revertToSourceCode" "addDifferentNamePod" "addSubPod" "deleteAPod" "addVendoredLibPod" "universalFlag" "multiplePlatforms" "multiplePlatformsWithALLFlag" "oldPodVersion" "upgradePodVersion")
1111
for action in ${cases[@]}; do
1212
python change_podfile.py ${action}
1313
bundle exec pod install

0 commit comments

Comments
 (0)