From acf8efe72aecbc523827b1e3d008f3fe2c1d2ea7 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Thu, 17 Oct 2019 14:29:41 -0300 Subject: [PATCH] Testing IPC module. --- client/src/core/abstract.cc | 2 +- client/src/testprogram/testprogram.cc | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/client/src/core/abstract.cc b/client/src/core/abstract.cc index be5f4f6..631d076 100644 --- a/client/src/core/abstract.cc +++ b/client/src/core/abstract.cc @@ -151,7 +151,7 @@ /// @brief Converte string recebida do host para o charset atual. std::string Abstract::Session::convertFromHost(const std::string &str) const { - debug(__FUNCTION__,"(",str.c_str(),")"); +// debug(__FUNCTION__,"(",str.c_str(),")"); return convertCharset(const_cast(this)->converter.local,str.c_str(),str.size()); } diff --git a/client/src/testprogram/testprogram.cc b/client/src/testprogram/testprogram.cc index 66b920c..35b20ac 100644 --- a/client/src/testprogram/testprogram.cc +++ b/client/src/testprogram/testprogram.cc @@ -44,6 +44,8 @@ using namespace std; + #pragma GCC diagnostic ignored "-Wunused-function" + /*---[ Implement ]----------------------------------------------------------------------------------*/ /* @@ -119,11 +121,10 @@ cout << "Version: " << host["version"] -// << "\tRevision: " << host["Revision"] -// << "\tConnected: " << host["Connected"] + << "\tRevision: " << host["Revision"] + << "\tConnected: " << host["Connected"] << std::endl; - /* host.connect(nullptr); cout @@ -145,16 +146,20 @@ // host.input("test@0another line"); host.push(TN3270::ENTER); + host.wait(10); + + cout << host << endl; cout << endl << "[" << host.toString((unsigned int) 1, (unsigned int) 3,7) << "]" << endl; cout << endl << "[" << host.toString((int) 15, (int) 10) << "]" << endl; host.pfkey(3); + host.wait(10); + cout << host << endl; host.wait(10); host.disconnect(); - */ } catch(const std::exception &e) { @@ -166,7 +171,6 @@ int main(int argc, char **argv) { - /* const char * session = ":a"; #pragma GCC diagnostic push @@ -190,11 +194,11 @@ } } - */ - // cout << "Session: " << session << endl; + cout << "Session: " << session << endl; + + testHost(session); - //testHost(session); //testAttributes(session); /* @@ -209,6 +213,7 @@ } */ + /* { TN3270::Host host{":a",nullptr,10}; @@ -218,7 +223,7 @@ delete action; } - + */ /* for(auto attribute : TN3270::getAttributes()) { -- libgit2 0.21.2