diff --git a/test/engine/engine_test.cpp b/test/engine/engine_test.cpp index e49dd1df..8682d36d 100644 --- a/test/engine/engine_test.cpp +++ b/test/engine/engine_test.cpp @@ -1192,3 +1192,22 @@ TEST(EngineTest, NoRefreshWhenCallingRunningBroadcast) ASSERT_VAR(stage, "passed2"); ASSERT_TRUE(GET_VAR(stage, "passed2")->value().toBool()); } + +TEST(EngineTest, NoStopWhenCallingRunningBroadcastFromCustomBlock) +{ + // Regtest for #257 + Project p("regtest_projects/277_custom_block_call_running_broadcast_stop.sb3"); + ASSERT_TRUE(p.load()); + p.run(); + + auto engine = p.engine(); + + Stage *stage = engine->stage(); + ASSERT_TRUE(stage); + + ASSERT_VAR(stage, "passed1"); + ASSERT_TRUE(GET_VAR(stage, "passed1")->value().toBool()); + + ASSERT_VAR(stage, "passed2"); + ASSERT_TRUE(GET_VAR(stage, "passed2")->value().toBool()); +} diff --git a/test/regtest_projects/277_custom_block_call_running_broadcast_stop.sb3 b/test/regtest_projects/277_custom_block_call_running_broadcast_stop.sb3 new file mode 100644 index 00000000..a82216ab Binary files /dev/null and b/test/regtest_projects/277_custom_block_call_running_broadcast_stop.sb3 differ