Skip to content

Commit d069623

Browse files
committed
add test
1 parent 99f5dfd commit d069623

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

asyncgit/src/sync/sign.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,4 +623,24 @@ mod tests {
623623

624624
Ok(())
625625
}
626+
627+
#[test]
628+
fn test_external_ssh_binary() -> Result<()> {
629+
let (_tmp_dir, repo) = repo_init_empty()?;
630+
631+
{
632+
let mut config = repo.config()?;
633+
config.set_str("gpg.program", "ssh")?;
634+
config.set_str("user.signingKey", "/tmp/key.pub")?;
635+
config.set_str("gpg.ssh.program", "/bin/cat")?;
636+
}
637+
638+
let sign =
639+
SignBuilder::from_gitconfig(&repo, &repo.config()?)?;
640+
641+
assert_eq!("/bin/cat", sign.program());
642+
assert_eq!("/tmp/key.pub", sign.signing_key());
643+
644+
Ok(())
645+
}
626646
}

0 commit comments

Comments
 (0)