about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Santos <dacs.git@brilhante.top>2022-03-17 14:24:13 +0000
committerDaniel Santos <dacs.git@brilhante.top>2022-03-17 14:24:13 +0000
commitfd66c372859c42f2dee036df8e5b83bd56934427 (patch)
treecd4043681379d3a63112d3f4f2f6ffce358ef84c /Makefile
parent3d304af497c697fcb7e54fb009839dd08e136970 (diff)
downloadnumericx-c-fd66c372859c42f2dee036df8e5b83bd56934427.tar.gz
invalid argument list of main() return E2BIG
 * If invalid number of arguments supplied to main(), return errno E2BIG
 * add Makefile rule to test memory leak of wrong number of arguments to
   main()

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 51c5a7c..20d4f71 100644
--- a/Makefile
+++ b/Makefile
@@ -61,9 +61,9 @@ clean:
 run: decimal-to-earth
 	./decimal-to-earth 21
 
-.PHONY: mem mem1 mem2 mem3
+.PHONY: mem mem1 mem2 mem3 mem4
 mem:
-	echo "the memory make rules are: mem1 mem2 mem3"
+	echo "the memory make rules are: mem1 mem2 mem3 mem4"
 
 mem1: decimal-to-earth
 	valgrind --leak-check=full --show-leak-kinds=all -s decimal-to-earth 999
@@ -74,6 +74,9 @@ mem2: decimal-to-earth
 mem3: decimal-to-earth
 	valgrind --leak-check=full --show-leak-kinds=all -s decimal-to-earth abc
 
+mem4: decimal-to-earth
+	valgrind --leak-check=full --show-leak-kinds=all -s decimal-to-earth 2 3
+
 
 decimal-to-earth_test-1: $(DEP)
 	$(CC) $(CFLAGS) -DFROM_NUMERICALS=\"0123456789\" -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DTO_NUMERICALS=\"12345\" -o $@ $^