Chris@4: CFLAGS=-O Chris@4: Chris@4: puff: puff.o pufftest.o Chris@4: Chris@4: puff.o: puff.h Chris@4: Chris@4: pufftest.o: puff.h Chris@4: Chris@4: test: puff Chris@4: puff zeros.raw Chris@4: Chris@4: puft: puff.c puff.h pufftest.o Chris@4: cc -fprofile-arcs -ftest-coverage -o puft puff.c pufftest.o Chris@4: Chris@4: # puff full coverage test (should say 100%) Chris@4: cov: puft Chris@4: @rm -f *.gcov *.gcda Chris@4: @puft -w zeros.raw 2>&1 | cat > /dev/null Chris@4: @echo '04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 Chris@4: @echo '00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 Chris@4: @echo '00 00 00 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 254 Chris@4: @echo '00 01 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 Chris@4: @echo '01 01 00 fe ff 0a' | xxd -r -p | puft -f 2>&1 | cat > /dev/null Chris@4: @echo '02 7e ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246 Chris@4: @echo '02' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 Chris@4: @echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 2 Chris@4: @echo '04 80 49 92 24 49 92 24 71 ff ff 93 11 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 249 Chris@4: @echo '04 c0 81 08 00 00 00 00 20 7f eb 0b 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246 Chris@4: @echo '0b 00 00' | xxd -r -p | puft -f 2>&1 | cat > /dev/null Chris@4: @echo '1a 07' | xxd -r -p | puft 2> /dev/null || test $$? -eq 246 Chris@4: @echo '0c c0 81 00 00 00 00 00 90 ff 6b 04' | xxd -r -p | puft 2> /dev/null || test $$? -eq 245 Chris@4: @puft -f zeros.raw 2>&1 | cat > /dev/null Chris@4: @echo 'fc 00 00' | xxd -r -p | puft 2> /dev/null || test $$? -eq 253 Chris@4: @echo '04 00 fe ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 252 Chris@4: @echo '04 00 24 49' | xxd -r -p | puft 2> /dev/null || test $$? -eq 251 Chris@4: @echo '04 80 49 92 24 49 92 24 0f b4 ff ff c3 84' | xxd -r -p | puft 2> /dev/null || test $$? -eq 248 Chris@4: @echo '04 00 24 e9 ff ff' | xxd -r -p | puft 2> /dev/null || test $$? -eq 250 Chris@4: @echo '04 00 24 e9 ff 6d' | xxd -r -p | puft 2> /dev/null || test $$? -eq 247 Chris@4: @gcov -n puff.c Chris@4: Chris@4: clean: Chris@4: rm -f puff puft *.o *.gc*