From 9cde275bb0dbe97b9f5eb5293a97f608324fa9db Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 27 Jul 2010 13:34:49 +0200 Subject: Add standard tests + Makefile --- Makefile | 27 +++++++++++++++++++++++++++ t/00-compile.t | 8 ++++++++ t/10-pod-coverage.t | 8 ++++++++ 3 files changed, 43 insertions(+) create mode 100644 Makefile create mode 100755 t/00-compile.t create mode 100755 t/10-pod-coverage.t diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..550126d --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +PREFIX ?= /usr/local + +main_dir = ${DESTDIR}${PREFIX} + +build/icli.1: bin/icli + mkdir -p build + pod2man $< > $@ + +install: build/icli.1 + mkdir -p ${main_dir}/bin ${main_dir}/share/man/man1 + cp bin/icli ${main_dir}/bin/icli + cp build/icli.1 ${main_dir}/share/man/man1/icli.1 + chmod 755 ${main_dir}/bin/icli + chmod 644 ${main_dir}/share/man/man1/icli.1 + + +test: + @prove + +uninstall: + rm -f ${main_dir}/bin/icli + rm -f ${main_dir}/share/man/man1/icli.1 + +clean: + rm -rf build + +.PHONY: clean install test uninstall diff --git a/t/00-compile.t b/t/00-compile.t new file mode 100755 index 0000000..31e3f3e --- /dev/null +++ b/t/00-compile.t @@ -0,0 +1,8 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.010; +use Test::More; +use Test::Compile; + +all_pl_files_ok('bin/icli'); diff --git a/t/10-pod-coverage.t b/t/10-pod-coverage.t new file mode 100755 index 0000000..1b2bbc0 --- /dev/null +++ b/t/10-pod-coverage.t @@ -0,0 +1,8 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.010; +use Test::More; +use Test::Pod; + +all_pod_files_ok('bin/icli'); -- cgit v1.2.3