From 3249da81c0016a987514a74ad7c3f62ffca62957 Mon Sep 17 00:00:00 2001 From: Artyom Poptsov Date: Sun, 22 Jun 2014 03:59:01 +0400 Subject: ssh/session.scm (session-get): New procedure * ssh/session-func.c (guile_ssh_session_get): New procedure. * ssh/session-func.h (guile_ssh_session_get): Likewise. * ssh/session.scm (session-get): New procedure. * tests/session.scm ("session-get"): New TC. * doc/api-sessions.texi (Sessions): Add description of `session-get' procedure. * NEWS: Update. --- tests/session.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/session.scm') diff --git a/tests/session.scm b/tests/session.scm index 5a62649..0175ad1 100644 --- a/tests/session.scm +++ b/tests/session.scm @@ -22,6 +22,9 @@ (test-begin "session") +(define %topdir (getenv "abs_top_srcdir")) +(define %rsakey (format #f "~a/tests/rsakey" %topdir)) + (test-assert "%make-session" (%make-session)) @@ -93,6 +96,19 @@ options) res)) +(test-assert "session-get" + (let* ((host "example.com") + (user "alice") + (proxycommand "test") + (session (make-session #:host host + #:user user + #:identity %rsakey + #:proxycommand proxycommand))) + (and (string=? (session-get session 'host) host) + (string=? (session-get session 'user) user) + (string=? (session-get session 'identity) %rsakey) + (string=? (session-get session 'proxycommand) proxycommand)))) + (test-assert "make-session" (make-session #:host "localhost" #:port 22 -- cgit v1.2.3