unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 190b36866ca6884c887ed7fb40b0a913d41496f1 1151 bytes (raw)
name: test/T055-path-config.sh 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
#!/usr/bin/env bash
test_description='Configuration of mail-root and database path'
. $(dirname "$0")/test-lib.sh || exit 1

add_email_corpus

test_begin_subtest "database is mail/.notmuch/xapian"
output=$(notmuch count '*')
test_expect_equal $output '52'

backup_database
test_begin_subtest "split (with prefix)"
notmuch config set database.path `pwd`/database
notmuch config set database.mail_root `pwd`/mail
mkdir database
mv mail/.notmuch database
output=$(notmuch count '*')
test_expect_equal "$output" '52'
restore_database

backup_database
test_begin_subtest "split (read-write)"
notmuch config set database.path `pwd`/database
notmuch config set database.mail_root `pwd`/mail
mkdir database
mv mail/.notmuch database
tag="tag${RANDOM}"
notmuch tag +$tag '*'
output=$(notmuch count tag:$tag)
test_expect_equal "$output" '52'
restore_database

backup_database
test_begin_subtest "create database in split configuration"
notmuch config set database.path `pwd`/database
notmuch config set database.mail_root `pwd`/mail
rm -r mail/.notmuch/xapian
notmuch new
output=$(notmuch count '*')
test_expect_equal "$output" '52'
restore_database

test_done

debug log:

solving 190b3686 ...
found 190b3686 in https://yhetil.org/notmuch/20210105022350.643917-3-david@tethera.net/

applying [1/1] https://yhetil.org/notmuch/20210105022350.643917-3-david@tethera.net/
diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh
new file mode 100755
index 00000000..190b3686

Checking patch test/T055-path-config.sh...
Applied patch test/T055-path-config.sh cleanly.

index at:
100755 190b36866ca6884c887ed7fb40b0a913d41496f1	test/T055-path-config.sh

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).