We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ed43f8 commit 502e8c5Copy full SHA for 502e8c5
1 file changed
tests/AuthTokenTest.cc
@@ -22,6 +22,7 @@
22
#include <pulsar/Client.h>
23
24
#include <boost/algorithm/string.hpp>
25
+#include <cctype>
26
#include <fstream>
27
#include <streambuf>
28
#include <string>
@@ -45,6 +46,9 @@ static const std::string tokenPath = TOKEN_PATH;
45
46
std::string getToken() {
47
std::ifstream file(tokenPath);
48
std::string str((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
49
+ while (!str.empty() && isspace(str.back())) {
50
+ str.pop_back();
51
+ }
52
return str;
53
}
54
0 commit comments