Skip to content

Commit 62eb348

Browse files
committed
change test case
1 parent 9f737d8 commit 62eb348

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

test/change_podfile.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,25 @@ def initial():
3939
def addSwiftPod():
4040
return (wrapper(
4141
"""
42-
pod "Masonry", :binary => true
42+
pod "RxCocoa", :binary => true
4343
pod "Literal", :binary => true
4444
"""),
4545
"""
46-
import Masonry
46+
import RxCocoa
4747
import Literal
4848
""")
4949

50+
def revertToSourceCode():
51+
return (wrapper(
52+
"""
53+
pod "RxCocoa", :binary => true
54+
pod "Literal"
55+
"""),
56+
"""
57+
import RxCocoa
58+
import Literal
59+
""")
60+
5061
def addDifferentNamePod():
5162
return (wrapper(
5263
"""
@@ -122,17 +133,4 @@ def universalFlag():
122133
if __name__ == "__main__":
123134
arg = sys.argv[1]
124135
print("change Podfile to: " + arg)
125-
if arg == "initial":
126-
save_to_podfile(initial())
127-
elif arg == "addSwiftPod":
128-
save_to_podfile(addSwiftPod())
129-
elif arg == "addDifferentNamePod":
130-
save_to_podfile(addDifferentNamePod())
131-
elif arg == "addSubPod":
132-
save_to_podfile(addSubPod())
133-
elif arg == "deleteAPod":
134-
save_to_podfile(deleteAPod())
135-
elif arg == "addVendoredLibPod":
136-
save_to_podfile(addVendoredLibPod())
137-
elif arg == "universalFlag":
138-
save_to_podfile(universalFlag())
136+
save_to_podfile(globals()[arg]())

test/test.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ python change_podfile.py "addSwiftPod"
1414
pod install
1515
build
1616

17+
#
18+
python change_podfile.py "revertToSourceCode"
19+
pod install
20+
build
21+
1722
#
1823
python change_podfile.py "addDifferentNamePod"
1924
pod install

0 commit comments

Comments
 (0)