Starting to use Uniglot for hooks standardization.

This commit is contained in:
2022-04-30 23:14:56 -05:00
parent ce2e2d3863
commit f034d627a6
17 changed files with 234 additions and 11 deletions

26
tests/test_imports.py Normal file
View File

@@ -0,0 +1,26 @@
import os
import pytest
def test_bash_import():
fh = os.popen("/bin/bash -c 'source Bash/header; [ `declare -F | wc -l` -eq `egrep -c ^function\\ Bash/header` ]'", mode='r', buffering=-1)
output = fh.read()
retcode = fh.close()
assert retcode == None
def test_c_import():
fh = os.popen("gcc -o tests/c.out C/ll.h", mode='r', buffering=-1)
output = fh.read()
retcode = fh.close()
assert retcode == None and os.path.isfile('tests/c.out')
def test_csharp_import():
fh = os.popen("/bin/bash -c 'mcs -out:tests/csharp.out CSharp/*.csharp tests/test.csharp'", mode='r', buffering=-1)
output = fh.read()
retcode = fh.close()
assert retcode == None and os.path.isfile('tests/csharp.out')
def test_remove_outs():
fh = os.popen("/bin/bash -c 'rm -Rf tests/*.out'", mode='r', buffering=-1)
output = fh.read()
retcode = fh.close()
assert retcode == None