| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
* appointment-001.sh: Compare output of "-a" with hardcoded data.
* next-001.sh: Compare output of "-n" with hardcoded data.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
| |
* day-001.sh: Compare output of "-d<date>" with hardcoded data.
* day-002.sh: Compare output of "-d<num>" with hardcoded data.
* day-003.sh: Compare output of "-d<num>" with "-s<date> -r<num>".
* range-001.sh: Compare output of "-r" with hardcoded data.
* range-002.sh: Compare output of "-r<num>" with hardcoded data.
* range-003.sh: Compare output of "-r<num>" with "-s<date> -r<num>".
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
| |
* todo-001.sh: Tests the "-t" command line option (calculates expected
output by parsing the todo data file).
* todo-002.sh: Tests "-t<num>" in a way similar to todo-001.sh.
* todo-003.sh: Tests "-t0" in a way similar to todo-001.sh.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* true-001.sh: Always returns true - this should never ever fail.
* run-test-001.sh: Invokes run-test, passing itself as a parameter.
Subsequently, it outputs the very same (hardcoded) expected and actual
values.
* run-test-002.sh: Tests run-test's negative assertion feature in a way
similar to run-test-001.sh. However, output different (hardcoded)
expected and actual values and invoke run-test with the negative test
prefix ('!').
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
| |
As a preparation for our test cases (needed for date formatting etc.)
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes, we might want to make negative assertions (tests where
expected and actual output are expected/known to be different). A test
can be marked negative by prefixing it with an exclamation mark ('!'):
$ ./run-test !test-negative
Running test-negative... ok
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|
|
Introduce a new "test/" sub-directory that contains tests for calcurse.
Right now, it only includes the quick-and-dirty "run-test" helper that
can be used to run and verify tests:
$ ./run-test test-1 test-2 test-3 test-4
Running test-1... ok
Running test-2... ok
Running test-3... FAIL
Each argument passed to run-test must be a test script located in the
current directory. run-test invokes each script twice and passes the
command line argument "expected" and "actual", respectively. A test case
succeeds if both "expected" and "actual" instances return with a zero
exit status and produce exactly the same output. It fails otherwise.
run-test terminates with a non-zero exit status as soon as one of the
test fails.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
|