Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shichen85 committed Jul 27, 2024
1 parent 80ab089 commit aa5e4bb
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 1 deletion.
1 change: 1 addition & 0 deletions Ganary/Ganary.resource_order
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{"name":"grc_o_http_request_buffer_body_test","order":7,"path":"objects/grc_o_http_request_buffer_body_test/grc_o_http_request_buffer_body_test.yy",},
{"name":"grc_o_keyboard_functions_test","order":4,"path":"objects/grc_o_keyboard_functions_test/grc_o_keyboard_functions_test.yy",},
{"name":"grc_o_room_functions_test","order":3,"path":"objects/grc_o_room_functions_test/grc_o_room_functions_test.yy",},
{"name":"grc_o_self_with_scope_test","order":15,"path":"objects/grc_o_self_with_scope_test/grc_o_self_with_scope_test.yy",},
{"name":"grc_o_video_end_event_missing","order":12,"path":"objects/grc_o_video_end_event_missing/grc_o_video_end_event_missing.yy",},
{"name":"grc_o_video_open_block","order":13,"path":"objects/grc_o_video_open_block/grc_o_video_open_block.yy",},
{"name":"o_grc_test_starter","order":1,"path":"objects/o_grc_test_starter/o_grc_test_starter.yy",},
Expand Down
3 changes: 2 additions & 1 deletion Ganary/Ganary.yyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Ganary/objects/grc_o_http_header_test/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// @description Insert description here
// You can write your code in this editor

// Inherit the parent event
event_inherited();
body = "shortString"
14 changes: 14 additions & 0 deletions Ganary/objects/grc_o_http_header_test/Other_62.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// @description Insert description here
// You can write your code in this editor
if (ds_map_find_value(async_load, "id") == req)
{
if (ds_map_find_value(async_load, "status") == 0)
{
var res_map = ds_map_find_value(async_load, "response_headers");
var actual_encoded = ds_map_find_value(res_map, "x-rumpus-dummy-body");
var matched = string_count(actual_encoded, encoded);
grc_async_assert(encoded, actual_encoded, "The request body should be returned as a base64 encoded string");
olympus_test_resolve();
instance_destroy();
}
}
40 changes: 40 additions & 0 deletions Ganary/objects/grc_o_http_header_test/grc_o_http_header_test.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ function grc_register_async_function_tests(){
})
}

olympus_add_async_test("http_header_test_short_body", function(){
//https://github.com/YoYoGames/GameMaker-Bugs/issues/6919
var ins = grc_instance_create(grc_o_http_header_test);
with ins {
var s = "a"
repeat 3052 {
s += "a";
}
body = s
}
return ins;
})

olympus_add_async_test("http_header_test_long_body", function(){
var ins = grc_instance_create(grc_o_http_header_test);
with ins {
var s = "a"
repeat 3054 {
s += "a";
}
body = s
}
return ins;
})

olympus_add_async_test("self_with_scope_test", function(){
//https://github.com/YoYoGames/GameMaker-Bugs/issues/6765
return grc_instance_create(grc_o_self_with_scope_test);
Expand Down

0 comments on commit aa5e4bb

Please sign in to comment.