Changed code to be compatible with python 2.5

This commit is contained in:
George Sokianos 2022-07-25 13:33:00 +01:00
parent 0a60fbb847
commit e95918cd7f
1 changed files with 8 additions and 7 deletions

View File

@ -16,29 +16,29 @@ test_001: $(FLAWFINDER) test.c test2.c
@echo "Testing for no ending newline:" >> test-results.txt
@$(PYTHON) $(FLAWFINDER) --omittime no-ending-newline.c | \
grep 'Lines analyzed' >> test-results.txt
@diff -u correct-results.txt test-results.txt
@diff -u --ignore-all-space correct-results.txt test-results.txt
test_002: $(FLAWFINDER) test.c test2.c
@echo 'test_002 (HTML output)'
@$(PYTHON) $(FLAWFINDER) --omittime --html --context test.c test2.c > test-results.html
@diff -u correct-results.html test-results.html
@diff -u --ignore-all-space correct-results.html test-results.html
test_003: $(FLAWFINDER) test.c test2.c
@echo 'test_003 (CSV output)'
@$(PYTHON) $(FLAWFINDER) --csv test.c test2.c > test-results.csv
@diff -u correct-results.csv test-results.csv
@diff -u --ignore-all-space correct-results.csv test-results.csv
test_004: $(FLAWFINDER) test.c
@echo 'test_004 (single-line)'
@$(PYTHON) $(FLAWFINDER) -m 5 -S -DC --quiet test.c > \
test-results-004.txt
@diff -u correct-results-004.txt test-results-004.txt
@diff -u --ignore-all-space correct-results-004.txt test-results-004.txt
test_005: $(FLAWFINDER) test-diff-005.patch test-patched.c
@echo 'test_005 (diff)'
@$(PYTHON) $(FLAWFINDER) -SQDC -P test-diff-005.patch \
test-patched.c > test-results-005.txt
@diff -u correct-results-005.txt test-results-005.txt
@diff -u --ignore-all-space correct-results-005.txt test-results-005.txt
test_006: $(FLAWFINDER) test.c
@echo 'test_006 (save/load hitlist)'
@ -48,7 +48,7 @@ test_006: $(FLAWFINDER) test.c
@$(PYTHON) $(FLAWFINDER) -SQDC -m 5 \
--loadhitlist test-saved-hitlist-006.txt > \
test-results-006.txt
@diff -u correct-results-006.txt test-results-006.txt
@diff -u --ignore-all-space correct-results-006.txt test-results-006.txt
test_007: $(SETUPPY)
@echo 'test_007 (setup.py sane)'
@ -64,7 +64,7 @@ test_008: $(FLAWFINDER) test.c
@$(PYTHON) $(FLAWFINDER) -S -C --quiet --omittime \
--diffhitlist test-saved-hitlist-008.txt test.c > \
test-results-008.txt
@diff -u correct-results-008.txt test-results-008.txt
@diff -u --ignore-all-space correct-results-008.txt test-results-008.txt
test_009: $(FLAWFINDER) test-cpp-digit-separator.cpp
@echo 'test_009 (C++ digit separator)'
@ -107,3 +107,4 @@ test-is-correct: test-results.txt
cp -p test-results-008.txt correct-results-008.txt
.PHONY: test check test-is-correct