unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 49df8ec53ffafd7788269a8dea41f8e6d3551c0f 1042 bytes (raw)
name: test/t0005-dump-restore.sh 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
#!/bin/bash

test_description="Testing \"notmuch dump\" and \"notmuch restore\""

. ./test-lib.sh

test_expect_success "Generate some message" '
generate_message &&
notmuch new
'

test_expect_success "Dumping all tags" '
notmuch dump dump.expected
'
test_expect_success "Clearing all tags" '
sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected &&
notmuch restore clear.expected &&
notmuch dump clear.actual &&
if diff clear.expected clear.actual > /dev/null; then
    echo "	PASS"
else
    echo "	FAIL"
    echo "	Expected output: See file clear.expected"
    echo "	Actual output:   See file clear.actual"
    false
fi
'
test_expect_success "Restoring original tags" '
notmuch restore dump.expected &&
notmuch dump dump.actual &&
if diff dump.expected dump.actual > /dev/null; then
    echo "	PASS"
else
    echo "	FAIL"
    echo "	Expected output: See file dump.expected"
    echo "	Actual output:   See file dump.actual"
    false
fi
'
test_expect_success "Restore with nothing to do" '
notmuch restore dump.expected
'

test_done

debug log:

solving 49df8ec ...
found 49df8ec in https://yhetil.org/notmuch/1265642169-15801-3-git-send-email-sojkam1@fel.cvut.cz/

applying [1/1] https://yhetil.org/notmuch/1265642169-15801-3-git-send-email-sojkam1@fel.cvut.cz/
diff --git a/test/t0005-dump-restore.sh b/test/t0005-dump-restore.sh
new file mode 100755
index 0000000..49df8ec

Checking patch test/t0005-dump-restore.sh...
Applied patch test/t0005-dump-restore.sh cleanly.

index at:
100755 49df8ec53ffafd7788269a8dea41f8e6d3551c0f	test/t0005-dump-restore.sh

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).