Baller
This commit is contained in:
parent
f52fb42f88
commit
9bae27c366
5
ucompile
5
ucompile
@ -15,6 +15,7 @@ def run_input_cases(program, verbose, output):
|
||||
print("Input:")
|
||||
system(f"cat {input_file}")
|
||||
print("")
|
||||
try:
|
||||
if (out := glob(input_file.replace(".in", ".out"))[0]):
|
||||
if verbose:
|
||||
print("Expected output:")
|
||||
@ -22,6 +23,8 @@ def run_input_cases(program, verbose, output):
|
||||
print("")
|
||||
if output:
|
||||
end_command += f" | diff {out} -"
|
||||
except IndexError:
|
||||
pass
|
||||
print(popen(end_command).read())
|
||||
|
||||
print("-----------")
|
||||
@ -43,6 +46,8 @@ def java_compile(file_name, maven=False, verbose=False):
|
||||
return
|
||||
|
||||
def c_compile(file_name, verbose=False, output=False):
|
||||
# Style the code in Meijster's way
|
||||
system("astyle -A2s2cxgk3W3xbj " + file_name)
|
||||
system("gcc -Wall -pedantic --std=c99 -g -o program -lm -Wno-unused-result " + file_name)
|
||||
run_input_cases("./program", verbose, output)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user