test: minigrep
	@echo "===== Testing minigrep ====="
	./minigrep minigrep-input-1.txt ing > minigrep-output-1.txt
	@echo "[diff between your results and the expected results]"
	@diff minigrep-output-1.txt minigrep-expected-1.txt;\
        if [ $$? -eq 0 ]; then echo "TEST PASSED"; else echo "TEST FAILED"; fi
	@echo

minigrep: minigrep.c
	@echo "===== Building minigrep ====="
	gcc -g -Wall -Werror -o $@ $<
	@echo

clean:
	rm -f minigrep
