aboutsummaryrefslogtreecommitdiff
path: root/test/T055-path-config.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-02-23 16:19:13 -0400
committerDavid Bremner <david@tethera.net>2021-03-27 09:26:14 -0300
commit217f8196088f200972d35ee9181bfe361cccc04a (patch)
treec6f6ceba6c51fbf7daaced601cccbaa057fadbce /test/T055-path-config.sh
parent2e39ce6eb5d5e5ae2a2a4ed419190003f47e566e (diff)
CLI+lib: detect missing database in split configurations.
Eventually we want to do all opening of databases in the top level (main function). This means that detection of missing databases needs to move out of subcommands. It also requires updating the library to use the new NO_DATABASE status code.
Diffstat (limited to 'test/T055-path-config.sh')
-rwxr-xr-xtest/T055-path-config.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh
index d8828342..0a34e67f 100755
--- a/test/T055-path-config.sh
+++ b/test/T055-path-config.sh
@@ -199,6 +199,22 @@ EOF
"$output" \
"Welcome to a new version of notmuch! Your database will now be upgraded."
+ test_begin_subtest "notmuch +config -database suggests notmuch new ($config)"
+ mv "$XAPIAN_PATH" "${XAPIAN_PATH}.bak"
+ notmuch > OUTPUT
+cat <<EOF > EXPECTED
+Notmuch is configured, but no database was found.
+You probably want to run "notmuch new" now to create a database.
+
+Note that the first run of "notmuch new" can take a very long time
+and that the resulting database will use roughly the same amount of
+storage space as the email being indexed.
+
+EOF
+ mv "${XAPIAN_PATH}.bak" "$XAPIAN_PATH"
+
+ test_expect_equal_file EXPECTED OUTPUT
+
restore_config
done