Sfoglia il codice sorgente

add test for return code passthrough

Jan Klemkow 6 anni fa
parent
commit
68aff5cc7e
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      Makefile

+ 6 - 1
Makefile

@@ -2,8 +2,13 @@ CFLAGS += -std=c99 -pedantic -Wall -Wextra
 LDLIBS += -lutil
 CPPFLAGS += -D_DEFAULT_SOURCE
 
-.PHONY: all clean
+.PHONY: all clean test
 
 all: scroll
 clean:
 	rm -f scroll
+
+test: scroll
+	# return code passthrough of childs
+	./scroll /usr/bin/true  && if [ $$? -ne 0 ]; then exit 1; fi
+	./scroll /usr/bin/false || if [ $$? -ne 1 ]; then exit 1; fi