Skip to content

Commit 714a29a

Browse files
committed
add test
1 parent b8637a2 commit 714a29a

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
@@ -621,4 +621,24 @@ mod tests {
621621

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

0 commit comments

Comments
 (0)