3 Commits

Author SHA1 Message Date
Lukas Fleischer
7904af5d9d Implement test initialization properly
Make test-init.sh work even if tests are executed from another
directory.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2014-07-08 15:12:37 +02:00
Lukas Fleischer
ba2c5c14f6 test/: Add default values for configuration variables
Add a small helper script called "test-init.sh" that is sourced in each
test case and initializes the CALCURSE and DATA_DIR environment
variables.

Update the test suite README to point out that setting these environment
variables is no longer required.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2013-02-27 11:36:28 +01:00
Lukas Fleischer
31b4c71eb2 test/: Add three basic self tests
* 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>
2012-01-22 00:13:35 +01:00