Skip to content

Commit

Permalink
Merge pull request #48 from deltamc-project/travis-tests
Browse files Browse the repository at this point in the history
Travis tests
  • Loading branch information
williambl authored Oct 18, 2017
2 parents b7e60bb + 3248735 commit 4e0679a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ language: python
python:
- "3.6"
install:
- pip install requests
- pip install requests pexpect
script:
- python3 run_tests.py
19 changes: 19 additions & 0 deletions run_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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 install MinecraftForge... ***\n")
deltamc.expect("> ")
deltamc.sendline("install MinecraftForge")
deltamc.expect("Done. Please run the installer.")
deltamc.expect("> ")
print("\n *** Test passed! *** \n")

0 comments on commit 4e0679a

Please sign in to comment.