fbt: Folder Based Test-Runner

Status: Sitesh is implementing this at fifthtry/fbt.

For some projects, especially ones that work with files etc, the best way to document and to test them is via a bunch of folders containing input and output folders after a command is executed.

Consider fifthtry/dmax tests folder for example, it sub-folders like 01_basic. Each such sub folder can be considered a “test case”.

In the test case folder, eg 01_basic we have two folders, input and output, and a file cmd.txt.

This project, fifthtry/fbt, goes through each test case, and runs the command listed in cmd.txt file, with current directory set as input. It then verifies that input has become identical to output, if so test is considered passed, else its considered failed.

When running the command listed in cmd.toml, it also ensures that command exited with proper status code. This is how cmd.toml looks like:

cmd = "cat one1"
code = 1
stdout = ''
stderr = 'cat: one1: No such file or directory'

The keys [code], [stdout] and [stderr] are optional. If [code] is missing exit code is assumed to be zero. If either of [stdout] or [stderr] are missing, the stdout and stderr of the command are ignored, else they must be exactly equal to what is specified in these keys.

output folder is optional. If the folder is missing, the command is still run inside input folder, but test is considered passed or failed only depending on exit code.

Table Of Content

Immobile v2


Rust: Or Type

Project Primer

Link Log

Oct 2020

August 2020

July 2020

June 2020

May 2020

April 2020

March 2020

February 2020

January 2020


Books Have Read / Recommend

Product Management Books

Badass: Making Users Awesome


Five Cs of An Organisation

Success and failure of encryption

Open Source

Observer: Observability for Rust

Realm: Web Development Framework Using Rust and Elm

MartD: Server To Browser Messages

On Writing And Formats Of Written Communications

Rust Stuff

fbt: Folder Based Test-Runner

dmax: Cargo Dependency Updater

Rust feature flags

Why is diesel not compatible with async?

Making Postgres Only Diesel Code To Also Support Sqlite

Rust Git2’s Concepts

Git Hash And Build Date In Rust Build

Systray Only Native App In Rust

Software and Tools I Use Often


DNS Over HTTPS Controversy

The Patel Motel Cartel

Standalone Complex


January 2020

Word Of The Day





Nix On OSX Catalina

Postgres: WAL / Logical Decoding

Postgres: Listen-Notify



Go All The Way

SSH Commands



SHA256 vs SHA224

Pronouns Bad


Web Components

Early Return