Skip to content

Commit

Permalink
Output of print() is stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Dec 26, 2012
1 parent 2efa79e commit 371be1e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/clipboardclient.cpp
Expand Up @@ -74,7 +74,7 @@ void ClipboardClient::readyRead()
}
}

if (exitCode != CommandPrint && exitCode != CommandActivateWindow)
if (exitCode != CommandActivateWindow)
exit(exitCode);
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/include/client_server.h
Expand Up @@ -45,8 +45,6 @@ typedef enum {
CommandError,
/** Bad command syntax. */
CommandBadSyntax,
/** Print */
CommandPrint,
/** Activate window */
CommandActivateWindow
} CommandStatus;
Expand Down
2 changes: 1 addition & 1 deletion src/scriptable.cpp
Expand Up @@ -862,7 +862,7 @@ void Scriptable::print(const QScriptValue &value)
bytes = value.toString().toLocal8Bit();
message = &bytes;
}
sendMessage(*message, CommandPrint);
sendMessage(*message, CommandSuccess);
}

void Scriptable::abort()
Expand Down
2 changes: 1 addition & 1 deletion tests/test.sh
Expand Up @@ -312,7 +312,7 @@ run importtab "$tmp" &&
ok || fail

log "checking imported tab content"
assert "run eval 'for (i = 0; i < 1000; ++i) {tab(\"test2\");a=read(i);tab(\"test3\");b=read(i);if(str(a)!=str(b))break;};i'" 1000 &&
assert "run eval 'for (i = 0; i < 1000; ++i) {tab(\"test2\");a=read(i);tab(\"test3\");b=read(i);if(str(a)!=str(b))break;}; print(i)'" 1000 &&
ok || fail

TAB=test2
Expand Down

0 comments on commit 371be1e

Please sign in to comment.