git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
blob eb7fffaef9046f4bf048a3390403c35c31bb5589 932 bytes (raw)
name: t/t9904-authors.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
 
#!/bin/sh

test_description='test authors'

. ./test-lib.sh

check_split() {
	echo "$1 -> $2" >expect
	test_expect_success "split '$1'" "
	test-authors split '$1' >actual &&
	test_cmp expect actual
	"
}

check_split 'xxx' 'error'
check_split 'Some Guy <sg@example.com> 1484387401 +0100' 'Some Guy <sg@example.com>'
check_split 'Some Guy <sg@example.com>,Another Pal <ap@example.com> 1484387401 +0100' 'Some Guy <sg@example.com>,Another Pal <ap@example.com>'
check_split 'Some Guy <sg@example.com>,Another Pal <ap@example.com>' 'Some Guy <sg@example.com>,Another Pal <ap@example.com>'

check_has_multiple() {
	echo "$1 -> $2" >expect
	test_expect_success "has multiple authors '$1'" "
	test-authors has-multiple '$1' >actual &&
	test_cmp expect actual
	"
}

check_has_multiple 'abc' 'no'
check_has_multiple 'Some Guy <sg@example.com>' 'no'
check_has_multiple 'Some Guy <sg@example.com>,Another Pal <ap@example.com>' 'yes'

test_done

debug log:

solving eb7fffa ...
found eb7fffa in https://public-inbox.org/git/1485713194-11782-1-git-send-email-schumacher@kde.org/

applying [1/1] https://public-inbox.org/git/1485713194-11782-1-git-send-email-schumacher@kde.org/
diff --git a/t/t9904-authors.sh b/t/t9904-authors.sh
new file mode 100755
index 0000000..eb7fffa

Checking patch t/t9904-authors.sh...
Applied patch t/t9904-authors.sh cleanly.

index at:
100755 eb7fffaef9046f4bf048a3390403c35c31bb5589	t/t9904-authors.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://80x24.org/mirrors/git.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).