Test cases.
This commit is contained in:
parent
0540dfc823
commit
b170399712
4 changed files with 6 additions and 4 deletions
8
Makefile
8
Makefile
|
@ -1,10 +1,14 @@
|
||||||
FILE = netcalc
|
FILE = netcalc
|
||||||
|
|
||||||
all: $(FILE)
|
all: $(FILE) tests
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm netcalc
|
rm netcalc
|
||||||
|
|
||||||
$(FILE): netcalc.c
|
$(FILE): $(FILE).c
|
||||||
gcc $^ -o $@
|
gcc $^ -o $@
|
||||||
|
|
||||||
|
tests:
|
||||||
|
./netcalc -c < test/cases > test/results
|
||||||
|
diff test/results test/expected
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
cat cases | ../netcalc -c > results
|
|
||||||
diff expected results
|
|
Loading…
Add table
Add a link
Reference in a new issue