From 3d07c446111ec95480588ef50b75306b7345296c Mon Sep 17 00:00:00 2001 From: Michael Bideau Date: Sun, 1 Nov 2020 13:28:14 +0100 Subject: [PATCH] README: added a section 'Testing' --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index decd48f..7c4bd31 100644 --- a/README.md +++ b/README.md @@ -156,3 +156,23 @@ So, if you want that vCards that have same email, and same organisation to be gr ``` python3 vcardtools.py --no-match-approx --merge --match-attributes email --match-attributes org ... ``` + +## Testing + +A very basic mechanism of functional testing was implemented. +To run the tests, just use : +``` +test/run_some_tests.sh +``` +Or to get more info : + +``` +DEBUG=true test/run_some_tests.sh +``` + +This script will do a run and compare process for every directory in the `test/cases` folder. +It runs the _vcardtools.py_ with the sources files contained in the directory `src` of the current test case, +and output the result to a temporary directory. +Then it compares each files in the `expected` directory of the current test case, with the files in the resulting folder. +If files differs, the test fails. +If the _vcardtools.py_ is supposed to fail/error, a single file name `FAILURE` should be put into the `expected` directory, containing the error message (output of the command to _stderr_).