Initial commit.

This commit is contained in:
2026-01-10 21:58:42 +00:00
committed by Seán Healy
commit 9ab19b842d
7 changed files with 4528 additions and 0 deletions

24
build_and_test.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -e
echo "Compiling BibTeX compiler..."
make clean && make
echo "Running compiler on sample.bib:"
./dist/bibtex_compiler < test/sample.bib
if [ $? -ne 0 ]; then
echo -e "[\033[0;31mFAILED\033[0m] Test 1 (sample.bib)."
else
echo -e "[\033[0;32mPASSED\033[0m] Test 1 (sample.bib)."
fi
./dist/bibtex_compiler < test/A_Theory_of_Justice.bibtex
if [ $? -ne 0 ]; then
echo -e "[\033[0;31mFAILED\033[0m] Test 2 (A_Theory_of_Justice.bibtex)."
else
echo -e "[\033[0;32mPASSED\033[0m] Test 2 (A_Theory_of_Justice.bibtex)."
fi
./dist/bibtex_compiler < test/big_file.bib
if [ $? -ne 0 ]; then
echo -e "[\033[0;31mFAILED\033[0m] Test 3 (big_file.bib)."
else
echo -e "[\033[0;32mPASSED\033[0m] Test 3 (big_file.bib)."
fi
echo "All tests completed."