bintest

Crates.iobintest
lib.rsbintest
version2.0.0
sourcesrc
created_at2021-06-19 13:21:03.802354
updated_at2024-03-16 14:29:38.508987
descriptionTesting the executables build by a bin crate
homepage
repositoryhttps://github.com/cehteh/bintest.git
max_upload_size
id412099
size29,757
(cehteh)

documentation

README

Testing the executables build by a bin crate.

Description

cargo test has no support for running tests on a build excecutable. This crate works around this deficiency.

How It Works

There are some problems to overcome the cargo limitations.

  1. Running cargo tests does not depend on the executables to be build, by default they are not compiled at test time.
  2. There are no standard facilities to locate and execute them in a test.

BinTest solve these problems by running cargo build at test time, parsing its output for identifying and locating the build executables. On request it creates a std::process::Command for the binary which can be used for any further testing.

Commit count: 27

cargo fmt