git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
4dc4ab35e55516f596befdec68df02335001c92f blob 2403 bytes (raw)

 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
 
#!/bin/sh

test_description='test env--helper'

. ./test-lib.sh


test_expect_success 'env--helper usage' '
	test_must_fail git env--helper &&
	test_must_fail git env--helper --mode-bool &&
	test_must_fail git env--helper --mode-ulong &&
	test_must_fail git env--helper --mode-bool --variable &&
	test_must_fail git env--helper --mode-bool --variable --default &&
	test_must_fail git env--helper --mode-bool --variable= --default=
'

test_expect_success 'env--helper bad default values' '
	test_must_fail git env--helper --mode-bool --variable=MISSING --default=1xyz &&
	test_must_fail git env--helper --mode-ulong --variable=MISSING --default=1xyz
'

test_expect_success 'env--helper --mode-bool' '
	echo 1 >expected &&
	git env--helper --mode-bool --variable=MISSING --default=1 --exit-code >actual &&
	test_cmp expected actual &&

	echo 0 >expected &&
	test_must_fail git env--helper --mode-bool --variable=MISSING --default=0 --exit-code >actual &&
	test_cmp expected actual &&

	git env--helper --mode-bool --variable=MISSING --default=0 >actual &&
	test_cmp expected actual &&

	>expected &&
	git env--helper --mode-bool --variable=MISSING --default=1 --exit-code --quiet >actual &&
	test_cmp expected actual &&

	EXISTS=true git env--helper --mode-bool --variable=EXISTS --default=0 --exit-code --quiet >actual &&
	test_cmp expected actual &&

	echo 1 >expected &&
	EXISTS=true git env--helper --mode-bool --variable=EXISTS --default=0 --exit-code >actual &&
	test_cmp expected actual
'

test_expect_success 'env--helper --mode-ulong' '
	echo 1234567890 >expected &&
	git env--helper --mode-ulong --variable=MISSING --default=1234567890 --exit-code >actual &&
	test_cmp expected actual &&

	echo 0 >expected &&
	test_must_fail git env--helper --mode-ulong --variable=MISSING --default=0 --exit-code >actual &&
	test_cmp expected actual &&

	git env--helper --mode-ulong --variable=MISSING --default=0 >actual &&
	test_cmp expected actual &&

	>expected &&
	git env--helper --mode-ulong --variable=MISSING --default=1234567890 --exit-code --quiet >actual &&
	test_cmp expected actual &&

	EXISTS=1234567890 git env--helper --mode-ulong --variable=EXISTS --default=0 --exit-code --quiet >actual &&
	test_cmp expected actual &&

	echo 1234567890 >expected &&
	EXISTS=1234567890 git env--helper --mode-ulong --variable=EXISTS --default=0 --exit-code >actual &&
	test_cmp expected actual
'

test_done
debug log:

solving 4dc4ab35e5 ...
found 4dc4ab35e5 in https://public-inbox.org/git/20190620210915.11297-3-avarab@gmail.com/

applying [1/1] https://public-inbox.org/git/20190620210915.11297-3-avarab@gmail.com/
diff --git a/t/t0017-env-helper.sh b/t/t0017-env-helper.sh
new file mode 100755
index 0000000000..4dc4ab35e5

Checking patch t/t0017-env-helper.sh...
Applied patch t/t0017-env-helper.sh cleanly.

index at:
100755 4dc4ab35e55516f596befdec68df02335001c92f	t/t0017-env-helper.sh

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git