diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-12-07 11:01:51 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-12-07 11:01:51 +0100 |
commit | ea05a6160c17460f8cdde00ac35f6023e47dd6a7 (patch) | |
tree | 7654383ad9548584a8e6b39782f1e13e8f527974 /tests | |
parent | 7099005f38ff72fa5de5f245eb15077d8708efd6 (diff) | |
download | libpam-freerdp2-ea05a6160c17460f8cdde00ac35f6023e47dd6a7.tar.gz libpam-freerdp2-ea05a6160c17460f8cdde00ac35f6023e47dd6a7.tar.bz2 libpam-freerdp2-ea05a6160c17460f8cdde00ac35f6023e47dd6a7.zip |
White-space clean-up.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mock_guest.c | 2 | ||||
-rw-r--r-- | tests/mock_pam.c | 2 | ||||
-rw-r--r-- | tests/test-freerdp-wrapper.cc | 18 |
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/mock_guest.c b/tests/mock_guest.c index 8bf2c3a..7fb4581 100644 --- a/tests/mock_guest.c +++ b/tests/mock_guest.c @@ -84,7 +84,7 @@ socket_sucker () } serv_addr.sun_family = AF_UNIX; - + int printsize = snprintf(serv_addr.sun_path, sizeof(serv_addr.sun_path) - 1, "%s/%s", home, ".freerdp-socket"); if (printsize > sizeof(serv_addr.sun_path) - 1 || printsize < 0) { return -1; diff --git a/tests/mock_pam.c b/tests/mock_pam.c index 2a1dcc7..7aef55a 100644 --- a/tests/mock_pam.c +++ b/tests/mock_pam.c @@ -112,7 +112,7 @@ int pam_get_item (const pam_handle_t *pamh, int type, const void **value) *value = pamh->conv; else if (pamh->item[type] != NULL) *value = pamh->item[type]; - else + else *value = NULL; /* will result in a prompt conversation */ return PAM_SUCCESS; diff --git a/tests/test-freerdp-wrapper.cc b/tests/test-freerdp-wrapper.cc index 6ba670f..ce1282b 100644 --- a/tests/test-freerdp-wrapper.cc +++ b/tests/test-freerdp-wrapper.cc @@ -63,25 +63,25 @@ namespace { pam_handle_t *pamh = pam_handle_empty_pswd_new (); - EXPECT_EQ (PAM_AUTH_ERR, + EXPECT_EQ (PAM_AUTH_ERR, pam_sm_authenticate (pamh, 0, 0, argv)); - + } - + TEST_F(FreerdpclientWrapperTest, canCallPamOpenSession) { const char *argv[] = { NULL }; pam_handle_t *pamh = pam_handle_new (); - EXPECT_EQ (PAM_SUCCESS, + EXPECT_EQ (PAM_SUCCESS, pam_sm_authenticate (pamh, 0, 0, argv)); - EXPECT_EQ (PAM_SUCCESS, + EXPECT_EQ (PAM_SUCCESS, pam_sm_setcred (pamh, 0, 0, argv)); - - EXPECT_EQ (PAM_SUCCESS, + + EXPECT_EQ (PAM_SUCCESS, pam_sm_open_session (pamh, 0, 0, argv)); - EXPECT_EQ(0, socket_sucker()); - EXPECT_EQ (PAM_SUCCESS, + EXPECT_EQ(0, socket_sucker()); + EXPECT_EQ (PAM_SUCCESS, pam_sm_close_session (pamh, 0, 0, argv)); } |