Working state
This commit is contained in:
@@ -9,7 +9,7 @@ def CheckOutput(output):
|
||||
|
||||
def test_c():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("make c &>/dev/null; ./helloworld", mode='r', buffering=-1)
|
||||
fh = os.popen("make c &>/dev/null; ./HelloWorld", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
@@ -23,42 +23,35 @@ def test_cs():
|
||||
|
||||
def test_java():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("make java &>/dev/null; java helloworld", mode='r', buffering=-1)
|
||||
fh = os.popen("make java &>/dev/null; java HelloWorld", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_bash():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("bash ./helloworld.bash", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_bash():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("bash ./helloworld.bash", mode='r', buffering=-1)
|
||||
fh = os.popen("./HelloWorld.bash", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_perl():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("perl ./helloworld.pl", mode='r', buffering=-1)
|
||||
fh = os.popen("./HelloWorld.pl", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_php():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("php ./helloworld.php", mode='r', buffering=-1)
|
||||
fh = os.popen("php ./HelloWorld.php", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
||||
def test_python():
|
||||
print(os.getcwd())
|
||||
fh = os.popen("python3 ./helloworld.py", mode='r', buffering=-1)
|
||||
fh = os.popen("./HelloWorld.py", mode='r', buffering=-1)
|
||||
output = fh.read()
|
||||
retcode = fh.close()
|
||||
assert retcode == None and CheckOutput(output)
|
||||
|
Reference in New Issue
Block a user