aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-05-06 21:16:38 -0300
committerDavid Bremner <david@tethera.net>2021-05-10 11:08:18 -0300
commit31098c4ae40511ffda9788a6654adbf898063d7f (patch)
tree92eea5708107efcc366ed8abe12a3059a95ee4bd /test
parentef0b1266190141b108a338ba06348e335ec4957b (diff)
lib/config: canonicalize paths relative to $HOME.
Prior to 0.32, notmuch had the (undocumented) behaviour that it expanded a relative value of database.path with respect to $HOME. In 0.32 this was special cased for database.path but broken for database.mail_root, which causes problems for at least notmuch-new when database.path is set to a relative path. The change in T030-config.sh reflects a user visible, but hopefully harmless behaviour change; the expanded form of the paths will now be printed by notmuch config.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T030-config.sh6
-rwxr-xr-xtest/T050-new.sh1
2 files changed, 3 insertions, 4 deletions
diff --git a/test/T030-config.sh b/test/T030-config.sh
index b22d8f29..7a1660e9 100755
--- a/test/T030-config.sh
+++ b/test/T030-config.sh
@@ -117,12 +117,12 @@ test_expect_equal "$(notmuch config get database.path)" \
ln -s `pwd`/mail home/Maildir
add_email_corpus
-test_begin_subtest "Relative database path expanded in open"
+test_begin_subtest "Relative database path expanded"
notmuch config set database.path Maildir
-path=$(notmuch config get database.path)
+path=$(notmuch config get database.path | notmuch_dir_sanitize)
count=$(notmuch count '*')
test_expect_equal "${path} ${count}" \
- "Maildir 52"
+ "CWD/home/Maildir 52"
test_begin_subtest "Add config to database"
notmuch new
diff --git a/test/T050-new.sh b/test/T050-new.sh
index 5c07b209..db443a1d 100755
--- a/test/T050-new.sh
+++ b/test/T050-new.sh
@@ -395,7 +395,6 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Relative database path expanded in new"
-test_subtest_known_broken
ln -s "$PWD/mail" home/Maildir
notmuch config set database.path Maildir
generate_message