bash lang added
This commit is contained in:
parent
80c819209c
commit
08de8a05f8
@ -70,4 +70,13 @@ languages = [
|
||||
image="swift",
|
||||
highlight="swift",
|
||||
),
|
||||
Language(
|
||||
id=6,
|
||||
name="Bash",
|
||||
work_name="Bash",
|
||||
file_type="sh",
|
||||
logo_url="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4b/Bash_Logo_Colored.svg/1200px-Bash_Logo_Colored.svg.png",
|
||||
image="gcc",
|
||||
highlight="sh",
|
||||
)
|
||||
]
|
||||
|
20
SprintLib/testers/BashTester.py
Normal file
20
SprintLib/testers/BashTester.py
Normal file
@ -0,0 +1,20 @@
|
||||
from os import listdir
|
||||
|
||||
from SprintLib.testers.BaseTester import BaseTester, TestException
|
||||
|
||||
|
||||
class BashTester(BaseTester):
|
||||
file = None
|
||||
|
||||
def before_test(self):
|
||||
for file in listdir(self.path):
|
||||
if file == 'solution.sh':
|
||||
self.call(f"chmod 777 {file}")
|
||||
self.file = file
|
||||
break
|
||||
if self.file is None:
|
||||
raise TestException("TE")
|
||||
|
||||
@property
|
||||
def command(self):
|
||||
return f"./{self.file}"
|
@ -7,3 +7,4 @@ from .CSharpTester import CSharpTester
|
||||
from .KotlinTester import KotlinTester
|
||||
from .SwiftTester import SwiftTester
|
||||
from .DistantTester import DistantTester
|
||||
from .BashTester import BashTester
|
||||
|
Loading…
Reference in New Issue
Block a user