Update test check output.

This commit is contained in:
Gunnar Beutner 2013-09-12 10:36:50 +02:00
parent 50d506dfd7
commit eb20b7e33e
1 changed files with 9 additions and 1 deletions

View File

@ -28,8 +28,16 @@ REGISTER_SCRIPTFUNCTION(NullCheck, &NullCheckTask::ScriptFunc);
Dictionary::Ptr NullCheckTask::ScriptFunc(const Service::Ptr&) Dictionary::Ptr NullCheckTask::ScriptFunc(const Service::Ptr&)
{ {
char name[255];
if (gethostname(name, sizeof(name)) < 0)
strcpy(name, "<unknown host>");
String output = "Hello from ";
output += name;
Dictionary::Ptr cr = boost::make_shared<Dictionary>(); Dictionary::Ptr cr = boost::make_shared<Dictionary>();
cr->Set("output", "This is a test."); cr->Set("output", output);
cr->Set("state", StateOK); cr->Set("state", StateOK);
return cr; return cr;