diff options
| author | David Bremner <david@tethera.net> | 2022-07-01 18:45:43 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-07-30 08:39:13 -0300 |
| commit | cef5eaaef61b1f4dde6276ef267fb923f1b16680 (patch) | |
| tree | d99e7bb83409f1fc7bb1302fe8449b56795c0c58 /test/T210-raw.sh | |
| parent | f599b8873f4fc748ae1befdac776b543e61045d7 (diff) | |
CLI/show: initial support for --duplicate for (raw output only)
Add command line argument --duplicate, analogous with that already
supported for notmuch-search.
Use of a seperate function for _get_filename is mainly a form of
documentation at this point.
md5sum is of course a weak hash, but it is good enough for
this (non-adversarial) test suite use.
Diffstat (limited to 'test/T210-raw.sh')
| -rwxr-xr-x | test/T210-raw.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/T210-raw.sh b/test/T210-raw.sh index e1d50bf9..44082028 100755 --- a/test/T210-raw.sh +++ b/test/T210-raw.sh @@ -64,4 +64,15 @@ for pow in {10..20}; do test_expect_success "notmuch show --format=raw subject:$size > /dev/null" done +add_email_corpus duplicate +ID=87r2ecrr6x.fsf@zephyr.silentflame.com +test_begin_subtest "raw content, duplicate files" +rm -f OUTPUT.raw +for dup in {1..5}; do + notmuch show --format=raw --duplicate=${dup} --format=raw id:${ID} | md5sum | cut -f1 -d' ' >> OUTPUT.raw +done +sort OUTPUT.raw > OUTPUT +notmuch search --output=files id:${ID} | xargs md5sum | cut -f1 -d ' ' | sort > EXPECTED +test_expect_equal_file_nonempty EXPECTED OUTPUT + test_done |
