unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob c3ece78b52bc019ec62e98e280698e816ae2030a 2020 bytes (raw)
name: test/T550-db-features.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
44
45
46
47
48
49
50
51
52
 
#!/usr/bin/env bash
test_description="database version and feature compatibility"

. $(dirname "$0")/test-lib.sh || exit 1

if [[ -n ${NOTMUCH_TEST_INSTALLED} ]]; then
    test_done
fi

test_begin_subtest "future database versions abort open"
${TEST_DIRECTORY}/make-db-version ${MAIL_DIR} 9999 ""
output=$(notmuch search x 2>&1 | sed 's/\(database at\) .*/\1 FILENAME/')
rm -rf ${MAIL_DIR}/.notmuch
test_expect_equal "$output" "\
Error: Notmuch database at FILENAME
       has a newer database format version (9999) than supported by this
       version of notmuch (3)."

test_begin_subtest "unknown 'rw' feature aborts read/write open"
${TEST_DIRECTORY}/make-db-version ${MAIL_DIR} 3 $'test feature\trw'
output=$(notmuch new 2>&1 | sed 's/\(database at\) .*/\1 FILENAME/')
rm -rf ${MAIL_DIR}/.notmuch
test_expect_equal "$output" "\
Error: Notmuch database at FILENAME
       requires features (test feature)
       not supported by this version of notmuch."

test_begin_subtest "unknown 'rw' feature aborts read-only open"
${TEST_DIRECTORY}/make-db-version ${MAIL_DIR} 3 $'test feature\trw'
output=$(notmuch search x 2>&1 | sed 's/\(database at\) .*/\1 FILENAME/')
rm -rf ${MAIL_DIR}/.notmuch
test_expect_equal "$output" "\
Error: Notmuch database at FILENAME
       requires features (test feature)
       not supported by this version of notmuch."

test_begin_subtest "unknown 'w' feature aborts read/write open"
${TEST_DIRECTORY}/make-db-version ${MAIL_DIR} 3 $'test feature\tw'
output=$(notmuch new 2>&1 | sed 's/\(database at\) .*/\1 FILENAME/')
rm -rf ${MAIL_DIR}/.notmuch
test_expect_equal "$output" "\
Error: Notmuch database at FILENAME
       requires features (test feature)
       not supported by this version of notmuch."

test_begin_subtest "unknown 'w' feature does not abort read-only open"
${TEST_DIRECTORY}/make-db-version ${MAIL_DIR} 3 $'test feature\tw'
output=$(notmuch search x 2>&1 | sed 's/\(database at\) .*/\1 FILENAME/')
rm -rf ${MAIL_DIR}/.notmuch
test_expect_equal "$output" ""

test_done

debug log:

solving c3ece78b ...
found c3ece78b in https://yhetil.org/notmuch/20211025145753.3031094-2-david@tethera.net/ ||
	https://yhetil.org/notmuch/20230104124145.2882983-4-david@tethera.net/ ||
	https://yhetil.org/notmuch/20230409142627.2216080-5-david@tethera.net/
found 9d5a9e70 in https://yhetil.org/notmuch.git/
preparing index
index prepared:
100755 9d5a9e70a598089793d5d06b136dcbd0ae428ced	test/T550-db-features.sh

applying [1/1] https://yhetil.org/notmuch/20211025145753.3031094-2-david@tethera.net/
diff --git a/test/T550-db-features.sh b/test/T550-db-features.sh
index 9d5a9e70..c3ece78b 100755

Checking patch test/T550-db-features.sh...
Applied patch test/T550-db-features.sh cleanly.

skipping https://yhetil.org/notmuch/20230104124145.2882983-4-david@tethera.net/ for c3ece78b
skipping https://yhetil.org/notmuch/20230409142627.2216080-5-david@tethera.net/ for c3ece78b
index at:
100755 c3ece78b52bc019ec62e98e280698e816ae2030a	test/T550-db-features.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).