]> git.ipfire.org Git - thirdparty/git.git/blame - t/t1418-reflog-exists.sh
The third batch
[thirdparty/git.git] / t / t1418-reflog-exists.sh
CommitLineData
d3ab1a5f
ÆAB
1#!/bin/sh
2
3test_description='Test reflog display routines'
4GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
3e3b9321 7TEST_PASSES_SANITIZE_LEAK=true
d3ab1a5f
ÆAB
8. ./test-lib.sh
9
10test_expect_success 'setup' '
11 test_commit A
12'
13
14test_expect_success 'usage' '
15 test_expect_code 129 git reflog exists &&
16 test_expect_code 129 git reflog exists -h
17'
18
19test_expect_success 'usage: unknown option' '
20 test_expect_code 129 git reflog exists --unknown-option
21'
22
23test_expect_success 'reflog exists works' '
24 git reflog exists refs/heads/main &&
25 test_must_fail git reflog exists refs/heads/nonexistent
26'
27
28test_expect_success 'reflog exists works with a "--" delimiter' '
29 git reflog exists -- refs/heads/main &&
30 test_must_fail git reflog exists -- refs/heads/nonexistent
31'
32
a34393f5
ÆAB
33test_expect_success 'reflog exists works with a "--end-of-options" delimiter' '
34 git reflog exists --end-of-options refs/heads/main &&
35 test_must_fail git reflog exists --end-of-options refs/heads/nonexistent
36'
37
d3ab1a5f 38test_done