diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-08-04 08:10:31 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-04 08:10:31 -0700 |
| commit | fab596878c5bdac7ea0a95c4d2acd758442c9eaf (patch) | |
| tree | 6e802ad527db7d673dd60dfe2e076bc582085c18 | |
| parent | 8e75941b4f9fd0988224b9360020a0a94c771de7 (diff) | |
| parent | c26ecaf069080c6f9f98925530394a5b4c53e325 (diff) | |
| download | git-fab596878c5bdac7ea0a95c4d2acd758442c9eaf.tar.gz | |
Merge branch 'jb/t7510-gpg-program-path'
A new test to ensure that a recent change will keep working.
* jb/t7510-gpg-program-path:
t7510: use $PWD instead of $(pwd) inside PATH
t7510: add test cases for non-absolute gpg program
| -rwxr-xr-x | t/t7510-signed-commit.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh index 39677e859a..1201c85ba6 100755 --- a/t/t7510-signed-commit.sh +++ b/t/t7510-signed-commit.sh @@ -449,7 +449,17 @@ test_expect_success 'custom `gpg.program`' ' test_must_fail env LET_GPG_PROGRAM_FAIL=1 \ git commit -S --allow-empty -m must-fail 2>err && - grep zOMG err + grep zOMG err && + + # `gpg.program` starts with `~`, the path should be interpreted to be relative to `$HOME` + test_config gpg.program "~/fake-gpg" && + env HOME="$(pwd)" \ + git commit -S --allow-empty -m signed-commit && + + # `gpg.program` does not specify an absolute path, it should find a program in `$PATH` + test_config gpg.program "fake-gpg" && + env PATH="$PWD:$PATH" \ + git commit -S --allow-empty -m signed-commit ' test_done |
