-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun_tests.py
28 lines (27 loc) · 1.13 KB
/
run_tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import pexpect
import sys
print("Running tests on " + sys.platform)
deltamc = pexpect.spawn("python3 ./deltamc.py", encoding="UTF-8")
deltamc.logfile = sys.stdout
print("\n *** Attempting to set up the default instance... *** \n")
deltamc.expect("Enter mod folder location for instance default \(absolute path\)\: ")
deltamc.sendline(".")
deltamc.expect("Enter jar folder location for instance default \(absolute path\)\:")
deltamc.sendline(".")
deltamc.expect("Enter Minecraft version for instance default:")
deltamc.sendline("1.12")
print("\n *** Attempting to get info about MinecraftForge... ***\n")
deltamc.expect("> ")
deltamc.sendline("info MinecraftForge")
print("\n *** Info test passed! *** \n")
print("\n *** Attempting to install MinecraftForge... ***\n")
deltamc.expect("> ")
deltamc.sendline("install MinecraftForge")
deltamc.expect("Done. Please run the installer.")
deltamc.expect("> ")
print("\n *** Installation test passed! *** \n")
print("\n *** Attempting to remove MinecraftForge *** \n")
deltamc.sendline("remove MinecraftForge")
deltamc.expect("> ")
print("\n *** Removal test passed! *** \n")
print("\n *** Test passed! *** \n")