Crates.io | qbtt |
lib.rs | qbtt |
version | 0.1.1 |
source | src |
created_at | 2024-07-05 13:28:09.711854 |
updated_at | 2024-07-21 13:28:52.924342 |
description | Quinn's Basic TOML Tests for Rust is a very simple way to run and check tests right from the command line, with support for checksum, line_count, and string-contains checks |
homepage | |
repository | https://github.com/QpxDesign/qbtt-rs |
max_upload_size | |
id | 1292746 |
size | 27,118 |
QBTT runs commands from a TOML and checks to see if they match their expected output on stdout, checksum, and number of lines. QBTT is used by a number of my rust projects (command-line tools), like ngxav (a full-featured nginx log explorer) and webgrep (a full-browser-spec terminal-based web reader with js and pdf support).
install it from cargo: cargo install qbtt
create a .toml file with the correct entry syntax (see below)
then run the tests: qbtt test_cases.toml
[[test_cases]]
name = "Name"
run_type = "lines_count/checksum/output"
cmd = "<path_to_build_des> <args>"
expect = "xxx"
...
please report any issues you encounter to the 'issues' tab. We welcome contributions (bug fixes or new features)! just make a pr.