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.
Client | Compliance |
---|---|
tealdeer | |
tldr-c-client | |
tldr-node-client | |
tldr-python-client | |
tlrc |
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.
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.
sudo apt install bats make