diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-07-27 13:34:49 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-07-27 13:34:49 +0200 |
commit | 9cde275bb0dbe97b9f5eb5293a97f608324fa9db (patch) | |
tree | a0a5ed6fd1b9905015f9eff61e4790515bdcda5e | |
parent | 31a580f18ae0bb78acec5ee2bcc0b1700a55e560 (diff) |
Add standard tests + Makefile
-rw-r--r-- | Makefile | 27 | ||||
-rwxr-xr-x | t/00-compile.t | 8 | ||||
-rwxr-xr-x | t/10-pod-coverage.t | 8 |
3 files changed, 43 insertions, 0 deletions
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'); |