From 10bca653a0e4da2b8fc0d82f3011f2eb98871ada Mon Sep 17 00:00:00 2001 From: Emil Sit Date: Sun, 12 Apr 2009 10:14:09 -0400 Subject: [PATCH] tests: Update documentation to reflect recent changes. Merge Phil's README_generate-test into the main README and also update the test library documentation to reflect test_todo_session and test_tick. Signed-off-by: Emil Sit --- tests/README | 41 +++++++++++++++++++++++++++++++++++++- tests/README_generate-test | 15 -------------- 2 files changed, 40 insertions(+), 16 deletions(-) delete mode 100644 tests/README_generate-test diff --git a/tests/README b/tests/README index 514c0a5..7e748fa 100644 --- a/tests/README +++ b/tests/README @@ -176,6 +176,23 @@ Test harness library There are a handful helper functions defined in the test harness library for your script to use. + - test_todo_session < transcript + + This takes a single string as a parameter, which is treated + as a base description of what is being tested, and then + reads from standard input a transcript of todo.sh commands + and expected output. Each command is run in the current + test environment and the output is compared with the + expected output. (See below for how to generate transcripts + easily.) + + - test_tick [interval] + + The test harness has an internal view of time which is + implemented by wrapping the date command. This takes a single + optional positive integer parameter which indicates how much + to advance the internal time. The default value is one day. + - test_expect_success