Skip to content

Commit

Permalink
Amend helper_launch_ok test
Browse files Browse the repository at this point in the history
  • Loading branch information
estringana committed Dec 15, 2022
1 parent 45d630f commit de1f806
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tests/extension/inc/helper_invocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,18 @@
fwrite(STDERR, "read remaining data");

fflush(STDERR);

$version = $argv[1];
//The message supposing version is 0.4.0 is [["client_init", ["ok", "0.4.0", [], {}, {}]]]
$message = "\x91\x92". //[[
"\xABclient_init". //"client_init"
"\x95". // [
"\xA2ok". //"ok"
chr(0xA0 + strlen($version)) . $version . //"0.4.0"
"\x90\x80\x80"; // [], {}, {}]]]

$data = "dds\0" .
chr(4 + 1 + strlen($version) + 3) . "\x00\x00\x00" . // length in little-endian
"\x95\xa2ok" . // ["ok", <>] in msgpac k
chr(0xA0 + strlen($version)) . $version . // "$version" in msgpack
"\x90\x80\x80";
chr(strlen($message)) . "\x00\x00\x00" . // length in little-endian
$message;

fwrite($cstream, $data);

0 comments on commit de1f806

Please sign in to comment.