8000 GitHub - neonsoftware/cmake-bats: CMake integration of the BATS shell testing framework
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

neonsoftware/cmake-bats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMake on multiple platforms GitHub release (latest by date)



cmake-bats

Test your C++ application with the shell BATS testing framework.

CMake and CTest integration of the BATS shell testing framework, allowing automatic test discovery and execution.

usage

In your CMakeLists.txt

include(CTest)

include(FetchContent)

# import cmake-bats
FetchContent_Declare(
        cmake-bats
        GIT_REPOSITORY https://github.com/neonsoftware/cmake-bats.git
        GIT_TAG main)

FetchContent_MakeAvailable(cmake-bats)

# include bats test discovery
list(APPEND CMAKE_MODULE_PATH ${cmake-bats_SOURCE_DIR}/cmake)
include(BatsTest)

# discover all tests in all .bats files
file(GLOB BATS_TEST_FILES_SRC *.sh *.bats)
bats_discover_tests("${BATS_TEST_FILES_SRC}")

Or see how the C++ application is tested in the sample project.

About

CMake integration of the BATS shell testing framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

0