diff options
| author | David Bremner <david@tethera.net> | 2023-12-21 09:04:00 -0800 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2024-08-06 06:50:33 -0300 |
| commit | a691d54280b574035d38f3827d5caca9d0a6ae5b (patch) | |
| tree | 05271c8eafe3c20356d0d46c188018af9bd62580 /test/T520-show.sh | |
| parent | bc989209171d406b3671024542e59b86b0ecb23d (diff) | |
CLI/show: warn if crypto options are used with mbox format
This limitation seems somewhat hard to fix, but at least try to warn
users when combining crypto operations with mbox output format.
Because the default is --decrypt=auto, the warning is omitted if
--decrypt=auto is specified. While this is not great, it seems more
wrong to always warn, or to change the default because of this.
Diffstat (limited to 'test/T520-show.sh')
| -rwxr-xr-x | test/T520-show.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/T520-show.sh b/test/T520-show.sh index 8121c3db..1f7f6aa8 100755 --- a/test/T520-show.sh +++ b/test/T520-show.sh @@ -17,6 +17,25 @@ notmuch show foo.. exit_code=$? test_expect_equal 1 $exit_code +test_begin_subtest "warning for --mbox --decrypt" +notmuch show --format=mbox --decrypt=true '*' 1>/dev/null 2>OUTPUT +echo $? >> OUTPUT +cat <<EOF > EXPECTED +Warning: mbox format does not support decryption (ignored) +Warning: mbox format does not support signature verification (ignored) +0 +EOF +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest "warning for --mbox --verify" +notmuch show --format=mbox --verify '*' 1>/dev/null 2>OUTPUT +echo $? >> OUTPUT +cat <<EOF > EXPECTED +Warning: mbox format does not support signature verification (ignored) +0 +EOF +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "notmuch show --sort=newest-first" notmuch show --entire-thread=true '*' > EXPECTED notmuch show --entire-thread=true --sort=newest-first '*' > OUTPUT |
