e.g. env PATH=/opt/gnu/bin:$PATH make test
+For FreeBSD you need to install latest gdb from ports or packages and
+provide path to it in TEST_GDB environment variable before executing
+the tests, native FreeBSD gdb does not not work. If you install
+coreutils, which provides GNU versions of basic utils like 'date' and
+'base64' on FreeBSD, the test suite will use these instead of the
+native ones. This provides robustness against portability issues with
+these system tools. Most often the tests are written, reviewed and
+tested on Linux system so such portability issues arise from time to
+time.
+
+
Running Tests
-------------
The easiest way to run tests is to say "make test", (or simply run the
name of your test. Tests will be run in order the 'ddd' part determines.
The test script should start with the standard "#!/usr/bin/env bash"
-with copyright notices, and an assignment to variable 'test_description',
-like this:
+and an assignment to variable 'test_description', like this:
#!/usr/bin/env bash
- #
- # Copyright (c) 2005 Junio C Hamano
- #
test_description='xxx test (option --frotz)
There are a handful helper functions defined in the test harness
library for your script to use.
- test_expect_success <message> <script>
+ test_begin_subtest <message>
+
+ Set the test description message for a subsequent test_expect_*
+ invocation (see below).
+
+ test_expect_success <script>
- This takes two strings as parameter, and evaluates the
+ This takes a string as parameter, and evaluates the
<script>. If it yields success, test is considered
- successful. <message> should state what it is testing.
+ successful.
- test_begin_subtest <message>
+ test_expect_code <code> <script>
- Set the test description message for a subsequent test_expect_equal
- invocation (see below).
+ This takes two strings as parameter, and evaluates the <script>.
+ If it yields <code> exit status, test is considered successful.
test_subtest_known_broken