blob ac96bc3b9cfb1287c00df3a6d1564f0f4c58adb7 3362 bytes (raw)
name: t/t0041-usage.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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
| | #!/bin/sh
test_description='Test commands behavior when given invalid argument value'
. ./test-lib.sh
test_expect_success 'setup ' '
test_commit "v1.0"
'
test_expect_success 'tag --contains <existent_tag>' '
git tag --contains "v1.0" 1>actual 2>actual.err &&
grep "v1.0" actual &&
test_line_count = 0 actual.err
'
test_expect_success 'tag --contains <inexistent_tag>' '
test_must_fail git tag --contains "notag" 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_must_fail test_i18ngrep "usage" actual.err
'
test_expect_success 'tag --no-contains <existent_tag>' '
git tag --no-contains "v1.0" 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
'
test_expect_success 'tag --no-contains <inexistent_tag>' '
test_must_fail git tag --no-contains "notag" 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_must_fail test_i18ngrep "usage" actual.err
'
test_expect_success 'tag usage error' '
test_must_fail git tag --noopt 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "usage" actual.err
'
test_expect_success 'branch --contains <existent_commit>' '
git branch --contains "master" 1>actual 2>actual.err &&
test_i18ngrep "master" actual &&
test_line_count = 0 actual.err
'
test_expect_success 'branch --contains <inexistent_commit>' '
test_must_fail git branch --no-contains "nocommit" 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_must_fail test_i18ngrep "usage" actual.err
'
test_expect_success 'branch --no-contains <existent_commit>' '
git branch --no-contains "master" 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
'
test_expect_success 'branch --no-contains <inexistent_commit>' '
test_must_fail git branch --no-contains "nocommit" 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_must_fail test_i18ngrep "usage" actual.err
'
test_expect_success 'branch usage error' '
test_must_fail git branch --noopt 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "usage" actual.err
'
test_expect_success 'for-each-ref --contains <existent_object>' '
git for-each-ref --contains "master" 1>actual 2>actual.err &&
test_line_count = 2 actual &&
test_line_count = 0 actual.err
'
test_expect_success 'for-each-ref --contains <inexistent_object>' '
test_must_fail git for-each-ref --no-contains "noobject" 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_must_fail test_i18ngrep "usage" actual.err
'
test_expect_success 'for-each-ref --no-contains <existent_object>' '
git for-each-ref --no-contains "master" 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
'
test_expect_success 'for-each-ref --no-contains <inexistent_object>' '
test_must_fail git for-each-ref --no-contains "noobject" 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_must_fail test_i18ngrep "usage" actual.err
'
test_expect_success 'for-each-ref usage error' '
test_must_fail git for-each-ref --noopt 1>actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "usage" actual.err
'
test_done
|
debug log:
solving ac96bc3b9 ...
found ac96bc3b9 in https://public-inbox.org/git/20180320175005.18759-1-ungureanupaulsebastian@gmail.com/
applying [1/1] https://public-inbox.org/git/20180320175005.18759-1-ungureanupaulsebastian@gmail.com/
diff --git a/t/t0041-usage.sh b/t/t0041-usage.sh
new file mode 100755
index 000000000..ac96bc3b9
Checking patch t/t0041-usage.sh...
Applied patch t/t0041-usage.sh cleanly.
index at:
100755 ac96bc3b9cfb1287c00df3a6d1564f0f4c58adb7 t/t0041-usage.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).