Skip to content

A Bats test-suite that validates if a tldr-client is compatible with the client specifications set out in the tldr repository.

License

Notifications You must be signed in to change notification settings

tldr-pages/tldr-pages-test-harness

Repository files navigation

tldr-pages-test-harness

Matrix chat license

About

A Bats test-suite that validates if a tldr-pages client is compatible with the client specifications set out in the tldr repository.

You can see a summary of each test, including links to the relevant sections of the specification in the tldr.bats file.

Results

Client Compliance
tealdeer tldr-pages compliance level for tealdeer
tldr-c-client tldr-pages compliance level for tldr-c-client
tldr-node-client tldr-pages compliance level for tldr-node-client
tldr-python-client tldr-pages compliance level for tldr-python-client
tlrc tldr-pages compliance level for tlrc

Running Against Local Builds

This is for if you want to check the results for a particular client, or are a maintainer of a tldr-pages client and want to run your development build against our compliance test suite.

Run the validate task to test the tldr command found on your path:

make validate

Alternatively, you can test any arbitrary binary by specifying the PATH_TO_TLDR_CLIENT environment variable:

PATH_TO_TLDR_CLIENT={{path/to/binary}} make validate

There are also the validate-level-2 and validate-level-3 tasks to check if clients adhere to optional parts of the spec.

Docker

You can execute the tests for a predefined tldr-pages client even if you don't have it installed, so long as the Dockerfile is available for the client.

Check the contents of the dockerfiles/ directory, and run the CLIENT={{client}} docker-validate command, populating the CLIENT environment variable with the client to test. For example:

CLIENT=tldr-c-client make docker-validate

You can also run docker-validate-level-2 or docker-validate-level-3 to check optional parts of the spec.

Dependencies

Debian

sudo apt install bats make

About

A Bats test-suite that validates if a tldr-client is compatible with the client specifications set out in the tldr repository.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project