aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/net_websocket_frames_spec.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/net_websocket_frames_spec.lua b/spec/net_websocket_frames_spec.lua
index 244afa3b..519be7b9 100644
--- a/spec/net_websocket_frames_spec.lua
+++ b/spec/net_websocket_frames_spec.lua
@@ -43,6 +43,15 @@ describe("net.websocket.frames", function ()
["RSV2"] = false;
["RSV3"] = false;
};
+ empty_with_mask = {
+ ["opcode"] = 0;
+ ["key"] = " \0 \0";
+ ["FIN"] = true;
+ ["MASK"] = true;
+ ["RSV1"] = false;
+ ["RSV2"] = false;
+ ["RSV3"] = false;
+ };
}
describe("build", function ()
@@ -52,6 +61,7 @@ describe("net.websocket.frames", function ()
assert.equal("\0\5hello", build(test_frames.simple_data));
assert.equal("\128\0", build(test_frames.simple_fin));
assert.equal("\128\133 \0 \0HeLlO", build(test_frames.with_mask))
+ assert.equal("\128\128 \0 \0", build(test_frames.empty_with_mask))
end);
end);