tcp node - undo trim if we re-add split chars

and fix tests
This commit is contained in:
Dave Conway-Jones
2022-03-23 22:07:43 +00:00
parent bda5dffa34
commit 8a40622815
6 changed files with 11 additions and 11 deletions

View File

@@ -130,7 +130,7 @@ describe('TCP in Node', function() {
it('should recv data (Stream/String/Delimiter:o\\n) and reattach o', function(done) {
var flow = [{id:"n1", type:"tcp in", server:"server", host:"localhost", port:port, datamode:"stream", datatype:"utf8", newline:"o\n", trim:true, topic:"", base64:false, wires:[["n2"]] },
{id:"n2", type:"helper"}];
testTCP0(flow, ["foo\nbar"], ["foo", "bar"], done);
testTCP0(flow, ["foo\nbar"], ["foo\n", "bar"], done);
});

View File

@@ -293,7 +293,7 @@ describe('TCP Request Node', function() {
payload: "bar<A>\nfoo",
topic: 'boo'
}], {
payload: "ACK:foobar<A>",
payload: "ACK:foobar<A>\n",
topic: 'boo'
}, done);
});