Files
todo.txt-cli/tests/README_generate-test
Philippe Teuwen d6c57e4230 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>
2009-04-12 10:01:34 -04:00

16 lines
601 B
Plaintext

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!!