Description: run simple test after compilation
 The test suite can be extended once we add some small and simple bam files.
Author: Dominique Belhachemi <domibel@debian.org>

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,8 @@ cmake_policy( SET CMP0048 NEW )
 # set project name and version
 project( BamTools LANGUAGES CXX VERSION 2.5.1 )
 
+enable_testing()
+
 # on macOS, MACOSX_RPATH is enabled by default on more recent versions
 # of CMake. Disable this behaviour, and let user enable it if need be.
 cmake_policy( SET CMP0042 OLD )
@@ -98,3 +100,11 @@ include_directories("${CMAKE_BINARY_DIR}
 
 # list subdirectories to build in
 add_subdirectory( src )
+
+add_test(NAME    bamtools_help
+         COMMAND bin/bamtools --help
+)
+
+add_test(NAME    bamtools_stats
+         COMMAND bin/bamtools stats -in ${CMAKE_BINARY_DIR}/../debian/sam_spec_example.bam
+)
