From: David Bremner Date: Sat, 11 Dec 2021 12:49:11 +0000 (-0400) Subject: test/libconfig: save and restore config file X-Git-Tag: 0.35_rc0~48 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=c62ebcfea9ee4868a98b3889711a0fdd3f842605 test/libconfig: save and restore config file Currently the config file is unusable for further tests requiring a valid database path. --- diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh index eb303444..089b4e58 100755 --- a/test/T590-libconfig.sh +++ b/test/T590-libconfig.sh @@ -972,6 +972,7 @@ EOF test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "open: database parameter overrides implicit config" +cp $NOTMUCH_CONFIG ${NOTMUCH_CONFIG}.bak notmuch config set database.path ${MAIL_DIR}/nonexistent cat c_head3 - c_tail3 <<'EOF' | test_C ${MAIL_DIR} const char *path = NULL; @@ -982,6 +983,7 @@ cat c_head3 - c_tail3 <<'EOF' | test_C ${MAIL_DIR} path = notmuch_database_get_path (db); printf ("path: %s\n", path ? path : "(null)"); EOF +cp ${NOTMUCH_CONFIG}.bak ${NOTMUCH_CONFIG} cat < EXPECTED == stdout == status: 0