tests: add testshell.sh and port old testsuite.txt

Add a simple helper script testshell.sh that can be called
to set up an environment for generating test case transcripts
that can then be pasted into an actual test script.

Port old testsuite.txt into t9999-testsuite_example.sh
with the aim of refactoring it later into smaller tests.

Also, change test_todo_session to count from one instead of zero when
autogenerating tests.

Signed-off-by: Emil Sit <sit@emilsit.net>
This commit is contained in:
Philippe Teuwen
2009-04-08 01:19:16 +02:00
committed by Emil Sit
parent b238a29430
commit d6c57e4230
4 changed files with 346 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
You can generate test scripts from screenshots as following:
$ ./testshell.sh
You'll be in a special test environment with an empty todo.txt
and the dates and timestamps will be artificially fixed.
Then the session can be used to make a unit test thanks to test_todo_session,
see the existing tests as examples.
Be careful to replace all occurences of the full path to the test directory
by $HOME as testshell.sh will explain you when you execute it otherwise the
tests will work properly only on your own computer.
Don't use "script" as this would log every keystroke, not only what's visible!!