<commit_before>############################################################
# Project 3 Makefile
# by <NAME> & <NAME>
#
# `make` to build Project 3 normally
# `make clean` to clean build files
# `make test` to run deployment tests
#
############################################################
CC = gcc
CFLAGS = -ggdb -Wall -pthread
VAL = valgrind --quiet --leak-check=yes --undef-value-errors=no --error-exitcode=1
OUT = p3
OBJECTS = queue.o
RM = rm -f

ECHO = echo -e
R_ALIGN = awk '{printf "%$(shell tput cols)s\n", $$1}'
FAIL_STRING = "\x1b[31;01m[FAILURE]\x1b[0m"
GOOD_STRING = "\x1b[32;01m[GOOD]\x1b[0m"

all: p3

p3: p3.c $(OBJECTS)
	$(CC) $(CFLAGS) -o $(OUT) $^

queue.o: queue.c
	$(CC) $(CFLAGS) -c $<

test: p3
	$(VAL) ./$(OUT) || ($(ECHO) $(FAIL_STRING) | $(R_ALIGN); exit 1)
	@$(ECHO) $(GOOD_STRING) | $(R_ALIGN)

clean:
	$(RM) $(OUT) *.o *~
<commit_msg>Revised testing target in the Makefile<commit_after>############################################################
# Project 3 Makefile
# by <NAME> & <NAME>
#
# `make` to build Project 3 normally
# `make clean` to clean build files
# `make test` to run deployment tests
#
############################################################
CC = gcc
CFLAGS = -ggdb -Wall -pthread
VAL = valgrind --quiet --leak-check=yes --undef-value-errors=no --error-exitcode=1
OUT = p3
OBJECTS = queue.o
RM = rm -f

ECHO = echo -e
R_ALIGN = awk '{printf "%$(shell tput cols)s\n", $$1}'
FAIL_STRING = "\x1b[31;01m[FAILURE]\x1b[0m"
GOOD_STRING = "\x1b[32;01m[GOOD]\x1b[0m"

all: p3

p3: p3.c $(OBJECTS)
	$(CC) $(CFLAGS) -o $(OUT) $^

queue.o: queue.c
	$(CC) $(CFLAGS) -c $<

test: p3
	$(VAL) ./$(OUT) 10 10 1 || ($(ECHO) $(FAIL_STRING) | $(R_ALIGN); exit 1)
	@$(ECHO) $(GOOD_STRING) | $(R_ALIGN)
	$(VAL) ./$(OUT) 10 10 0 || ($(ECHO) $(FAIL_STRING) | $(R_ALIGN); exit 1)
	@$(ECHO) $(GOOD_STRING) | $(R_ALIGN)
	$(VAL) ./$(OUT) 10 11 0 || ($(ECHO) $(FAIL_STRING) | $(R_ALIGN); exit 1)
	@$(ECHO) $(GOOD_STRING) | $(R_ALIGN)
	$(VAL) ./$(OUT) 21 10 0 || ($(ECHO) $(FAIL_STRING) | $(R_ALIGN); exit 1)
	@$(ECHO) $(GOOD_STRING) | $(R_ALIGN)

clean:
	$(RM) $(OUT) *.o *~

{'fraction_non_alphanumeric': 0.3150880533079486, 'fraction_numerical': 0.033793431699190864, 'mean_word_length': 4.546174142480211, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7399024', 'n_tokens_mistral': 903, 'n_tokens_neox': 848, 'n_words': 223}