diff options
| author | David Bremner <david@tethera.net> | 2021-12-11 08:49:11 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-01-15 15:49:00 -0400 |
| commit | c62ebcfea9ee4868a98b3889711a0fdd3f842605 (patch) | |
| tree | c5f662ac336b01e539f0a71c238135cae08c8622 | |
| parent | c7c422ded29e73f7f6b53e82c40a36c93c041253 (diff) | |
test/libconfig: save and restore config file
Currently the config file is unusable for further tests requiring a
valid database path.
| -rwxr-xr-x | test/T590-libconfig.sh | 2 |
1 files changed, 2 insertions, 0 deletions
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 <<EOF> EXPECTED == stdout == status: 0 |
