/neomutt-test-files

Files and directories for NeoMutt's build test

Primary LanguageShell

Test Files

This repo contains test files for the main NeoMutt source.

The NeoMutt source code comes with a set of unit tests.

They cover the Address, Core, Email and Mutt libraries.

See also: Test code coverage

Setup

git clone https://github.com/neomutt/neomutt
git clone https://github.com/neomutt/neomutt-test-files

# NEOMUTT_TEST_DIR must be an absolute path or a test will fail
export NEOMUTT_TEST_DIR="$HOME/neomutt-test-files"

(cd neomutt-test-files; ./setup.sh)

Build

Next, add an option to configure, to enable testing:

cd neomutt
./configure --testing [YOUR-OTHER-OPTIONS]
make

Testing

To run the tests use either of:

  • make test
  • test/neomutt-test

By calling the test program directly, you can run individual tests.

test/neomutt-test -l                     # List the test names
test/neomutt-test test_mutt_str_strncmp  # Run a particular test
test/neomutt-test mutt_str               # Rul all tests matching this string
test/neomutt-test -v test_url_free       # Run verbosely