]> git.notmuchmail.org Git - notmuch/blob - test/T040-setup.sh
lib: replace deprecated n_q_search_messages with status returning version
[notmuch] / test / T040-setup.sh
1 #!/usr/bin/env bash
2
3 test_description='"notmuch setup"'
4 . ./test-lib.sh || exit 1
5
6 test_begin_subtest "Notmuch new without a config suggests notmuch setup"
7 output=$(notmuch --config=new-notmuch-config new 2>&1)
8 test_expect_equal "$output" "\
9 Configuration file new-notmuch-config not found.
10 Try running 'notmuch setup' to create a configuration."
11
12 test_begin_subtest "Create a new config interactively"
13 notmuch --config=new-notmuch-config > /dev/null <<EOF
14 Test Suite
15 test.suite@example.com
16 another.suite@example.com
17
18 /path/to/maildir
19 foo bar
20 baz
21 EOF
22 output=$(notmuch --config=new-notmuch-config config list | notmuch_built_with_sanitize)
23 test_expect_equal "$output" "\
24 database.path=/path/to/maildir
25 user.name=Test Suite
26 user.primary_email=test.suite@example.com
27 user.other_email=another.suite@example.com;
28 new.tags=foo;bar;
29 new.ignore=
30 search.exclude_tags=baz;
31 maildir.synchronize_flags=true
32 crypto.gpg_path=gpg
33 built_with.compact=something
34 built_with.field_processor=something
35 built_with.retry_lock=something"
36
37 test_done