diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-20 05:14:36 +0000 |
commit | 09f61306ecfdf0e532c58460d8d868d50021e7db (patch) | |
tree | b6f46cb23ce41cddcb6e1320d5c1c4bd5d69e899 /t/t6005-rev-list-count.sh | |
parent | Adding debian version 1:2.43.0-1. (diff) | |
download | git-09f61306ecfdf0e532c58460d8d868d50021e7db.tar.xz git-09f61306ecfdf0e532c58460d8d868d50021e7db.zip |
Merging upstream version 1:2.45.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/t6005-rev-list-count.sh')
-rwxr-xr-x | t/t6005-rev-list-count.sh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/t/t6005-rev-list-count.sh b/t/t6005-rev-list-count.sh index 0729f80..ee0306a 100755 --- a/t/t6005-rev-list-count.sh +++ b/t/t6005-rev-list-count.sh @@ -18,20 +18,34 @@ test_expect_success 'no options' ' ' test_expect_success '--max-count' ' + test_must_fail git rev-list --max-count=1q HEAD 2>error && + grep "not an integer" error && + test_stdout_line_count = 0 git rev-list HEAD --max-count=0 && test_stdout_line_count = 3 git rev-list HEAD --max-count=3 && test_stdout_line_count = 5 git rev-list HEAD --max-count=5 && - test_stdout_line_count = 5 git rev-list HEAD --max-count=10 + test_stdout_line_count = 5 git rev-list HEAD --max-count=10 && + test_stdout_line_count = 5 git rev-list HEAD --max-count=-1 ' test_expect_success '--max-count all forms' ' + test_must_fail git rev-list -1q HEAD 2>error && + grep "not an integer" error && + test_must_fail git rev-list --1 HEAD && + test_must_fail git rev-list -n 1q HEAD 2>error && + grep "not an integer" error && + test_stdout_line_count = 1 git rev-list HEAD --max-count=1 && test_stdout_line_count = 1 git rev-list HEAD -1 && test_stdout_line_count = 1 git rev-list HEAD -n1 && - test_stdout_line_count = 1 git rev-list HEAD -n 1 + test_stdout_line_count = 1 git rev-list HEAD -n 1 && + test_stdout_line_count = 5 git rev-list HEAD -n -1 ' test_expect_success '--skip' ' + test_must_fail git rev-list --skip 1q HEAD 2>error && + grep "not an integer" error && + test_stdout_line_count = 5 git rev-list HEAD --skip=0 && test_stdout_line_count = 2 git rev-list HEAD --skip=3 && test_stdout_line_count = 0 git rev-list HEAD --skip=5 && |