redscript-mc 1.2.9 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/README.md +35 -33
  2. package/README.zh.md +35 -33
  3. package/demo.gif +0 -0
  4. package/dist/__tests__/mc-integration.test.js +85 -0
  5. package/dist/ast/types.d.ts +84 -2
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/lexer/index.d.ts +1 -1
  9. package/dist/lexer/index.js +2 -0
  10. package/dist/lowering/index.d.ts +3 -0
  11. package/dist/lowering/index.js +119 -11
  12. package/dist/optimizer/dce.js +6 -0
  13. package/dist/parser/index.d.ts +4 -0
  14. package/dist/parser/index.js +171 -18
  15. package/package.json +1 -1
  16. package/src/__tests__/fixtures/array-test.mcrs +30 -0
  17. package/src/__tests__/fixtures/break-continue-test.mcrs +46 -0
  18. package/src/__tests__/fixtures/enum-test.mcrs +37 -0
  19. package/src/__tests__/fixtures/foreach-at-test.mcrs +33 -0
  20. package/src/__tests__/fixtures/match-range-test.mcrs +45 -0
  21. package/src/__tests__/fixtures/struct-test.mcrs +34 -0
  22. package/src/__tests__/mc-integration.test.ts +97 -0
  23. package/src/ast/types.ts +24 -1
  24. package/src/index.ts +1 -1
  25. package/src/lexer/index.ts +3 -1
  26. package/src/lowering/index.ts +123 -11
  27. package/src/optimizer/dce.ts +6 -0
  28. package/src/parser/index.ts +159 -18
  29. package/test-datapacks/README.md +67 -0
  30. package/test-datapacks/test_control_flow/data/minecraft/tags/function/load.json +5 -0
  31. package/test-datapacks/test_control_flow/data/test_control_flow/function/__load.mcfunction +41 -0
  32. package/test-datapacks/test_control_flow/data/test_control_flow/function/run_control_flow_tests.mcfunction +21 -0
  33. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/else_7.mcfunction +3 -0
  34. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/else_8.mcfunction +3 -0
  35. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/for_body_1.mcfunction +5 -0
  36. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/for_check_0.mcfunction +5 -0
  37. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/for_continue_2.mcfunction +5 -0
  38. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/for_exit_2.mcfunction +5 -0
  39. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/for_exit_3.mcfunction +5 -0
  40. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/merge_5.mcfunction +5 -0
  41. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/merge_6.mcfunction +2 -0
  42. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/merge_8.mcfunction +1 -0
  43. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/merge_9.mcfunction +1 -0
  44. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/then_3.mcfunction +3 -0
  45. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/then_4.mcfunction +3 -0
  46. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/then_6.mcfunction +3 -0
  47. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break/then_7.mcfunction +3 -0
  48. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_break.mcfunction +4 -0
  49. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/else_1.mcfunction +3 -0
  50. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/else_10.mcfunction +3 -0
  51. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/else_4.mcfunction +3 -0
  52. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/else_7.mcfunction +3 -0
  53. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/merge_11.mcfunction +1 -0
  54. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/merge_2.mcfunction +9 -0
  55. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/merge_5.mcfunction +7 -0
  56. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/merge_8.mcfunction +13 -0
  57. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/then_0.mcfunction +3 -0
  58. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/then_3.mcfunction +3 -0
  59. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/then_6.mcfunction +3 -0
  60. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions/then_9.mcfunction +3 -0
  61. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_complex_conditions.mcfunction +12 -0
  62. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/else_7.mcfunction +3 -0
  63. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/else_8.mcfunction +3 -0
  64. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/for_body_1.mcfunction +7 -0
  65. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/for_check_0.mcfunction +5 -0
  66. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/for_continue_2.mcfunction +5 -0
  67. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/for_exit_2.mcfunction +5 -0
  68. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/for_exit_3.mcfunction +5 -0
  69. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/merge_5.mcfunction +8 -0
  70. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/merge_6.mcfunction +5 -0
  71. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/merge_8.mcfunction +1 -0
  72. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/merge_9.mcfunction +1 -0
  73. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/then_3.mcfunction +2 -0
  74. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/then_4.mcfunction +2 -0
  75. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/then_6.mcfunction +3 -0
  76. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue/then_7.mcfunction +3 -0
  77. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_continue.mcfunction +4 -0
  78. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/else_13.mcfunction +3 -0
  79. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/else_16.mcfunction +3 -0
  80. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/else_4.mcfunction +3 -0
  81. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/else_5.mcfunction +3 -0
  82. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_body_1.mcfunction +5 -0
  83. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_body_10.mcfunction +8 -0
  84. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_body_12.mcfunction +5 -0
  85. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_body_7.mcfunction +3 -0
  86. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_body_8.mcfunction +3 -0
  87. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_check_0.mcfunction +5 -0
  88. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_check_11.mcfunction +5 -0
  89. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_check_6.mcfunction +5 -0
  90. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_check_7.mcfunction +5 -0
  91. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_check_9.mcfunction +5 -0
  92. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_continue_13.mcfunction +5 -0
  93. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_continue_2.mcfunction +5 -0
  94. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_continue_9.mcfunction +5 -0
  95. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_exit_10.mcfunction +5 -0
  96. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_exit_11.mcfunction +5 -0
  97. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_exit_14.mcfunction +2 -0
  98. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_exit_2.mcfunction +5 -0
  99. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_exit_3.mcfunction +5 -0
  100. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/for_exit_8.mcfunction +5 -0
  101. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/merge_14.mcfunction +1 -0
  102. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/merge_17.mcfunction +1 -0
  103. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/merge_5.mcfunction +4 -0
  104. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/merge_6.mcfunction +4 -0
  105. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/then_12.mcfunction +3 -0
  106. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/then_15.mcfunction +3 -0
  107. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/then_3.mcfunction +3 -0
  108. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop/then_4.mcfunction +3 -0
  109. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_for_loop.mcfunction +4 -0
  110. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_foreach_at/foreach_0.mcfunction +2 -0
  111. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_foreach_at.mcfunction +5 -0
  112. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_foreach_selector/else_1.mcfunction +3 -0
  113. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_foreach_selector/foreach_0.mcfunction +4 -0
  114. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_foreach_selector/merge_2.mcfunction +2 -0
  115. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_foreach_selector/then_0.mcfunction +3 -0
  116. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_foreach_selector.mcfunction +11 -0
  117. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/else_1.mcfunction +3 -0
  118. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/else_13.mcfunction +5 -0
  119. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/else_16.mcfunction +3 -0
  120. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/else_4.mcfunction +3 -0
  121. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/merge_11.mcfunction +2 -0
  122. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/merge_14.mcfunction +1 -0
  123. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/merge_17.mcfunction +2 -0
  124. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/merge_2.mcfunction +5 -0
  125. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/merge_5.mcfunction +5 -0
  126. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/merge_8.mcfunction +6 -0
  127. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/then_0.mcfunction +3 -0
  128. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/then_12.mcfunction +3 -0
  129. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/then_15.mcfunction +3 -0
  130. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/then_3.mcfunction +3 -0
  131. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/then_6.mcfunction +5 -0
  132. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else/then_9.mcfunction +3 -0
  133. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_if_else.mcfunction +6 -0
  134. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_match/match_0.mcfunction +3 -0
  135. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_match/match_1.mcfunction +3 -0
  136. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_match/match_2.mcfunction +3 -0
  137. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_match/match_3.mcfunction +2 -0
  138. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_match/match_4.mcfunction +3 -0
  139. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_match/match_5.mcfunction +3 -0
  140. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_match/match_6.mcfunction +3 -0
  141. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_match/match_7.mcfunction +3 -0
  142. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_match/match_8.mcfunction +3 -0
  143. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_match/match_9.mcfunction +2 -0
  144. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_match.mcfunction +15 -0
  145. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/else_13.mcfunction +3 -0
  146. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/else_4.mcfunction +3 -0
  147. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/loop_body_1.mcfunction +5 -0
  148. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/loop_body_7.mcfunction +8 -0
  149. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/loop_check_0.mcfunction +5 -0
  150. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/loop_check_6.mcfunction +4 -0
  151. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/loop_exit_2.mcfunction +5 -0
  152. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/loop_exit_8.mcfunction +5 -0
  153. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/merge_11.mcfunction +2 -0
  154. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/merge_14.mcfunction +1 -0
  155. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/merge_5.mcfunction +3 -0
  156. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/then_12.mcfunction +3 -0
  157. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/then_3.mcfunction +3 -0
  158. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop/then_9.mcfunction +2 -0
  159. package/test-datapacks/test_control_flow/data/test_control_flow/function/test_while_loop.mcfunction +3 -0
  160. package/test-datapacks/test_control_flow/pack.mcmeta +6 -0
  161. package/test-datapacks/test_control_flow.mcrs +242 -0
  162. package/test-datapacks/test_decorators/data/minecraft/tags/function/load.json +5 -0
  163. package/test-datapacks/test_decorators/data/minecraft/tags/function/tick.json +5 -0
  164. package/test-datapacks/test_decorators/data/test_decorators/function/__load.mcfunction +20 -0
  165. package/test-datapacks/test_decorators/data/test_decorators/function/__tick.mcfunction +3 -0
  166. package/test-datapacks/test_decorators/data/test_decorators/function/every_second/merge_2.mcfunction +9 -0
  167. package/test-datapacks/test_decorators/data/test_decorators/function/every_second/merge_5.mcfunction +1 -0
  168. package/test-datapacks/test_decorators/data/test_decorators/function/every_second/then_0.mcfunction +1 -0
  169. package/test-datapacks/test_decorators/data/test_decorators/function/every_second/then_3.mcfunction +4 -0
  170. package/test-datapacks/test_decorators/data/test_decorators/function/every_second/tick_body.mcfunction +6 -0
  171. package/test-datapacks/test_decorators/data/test_decorators/function/every_second/tick_skip.mcfunction +1 -0
  172. package/test-datapacks/test_decorators/data/test_decorators/function/every_second.mcfunction +5 -0
  173. package/test-datapacks/test_decorators/data/test_decorators/function/on_load.mcfunction +2 -0
  174. package/test-datapacks/test_decorators/data/test_decorators/function/on_test_trigger.mcfunction +2 -0
  175. package/test-datapacks/test_decorators/data/test_decorators/function/on_tick/merge_2.mcfunction +10 -0
  176. package/test-datapacks/test_decorators/data/test_decorators/function/on_tick/merge_5.mcfunction +5 -0
  177. package/test-datapacks/test_decorators/data/test_decorators/function/on_tick/merge_8.mcfunction +1 -0
  178. package/test-datapacks/test_decorators/data/test_decorators/function/on_tick/then_0.mcfunction +1 -0
  179. package/test-datapacks/test_decorators/data/test_decorators/function/on_tick/then_3.mcfunction +3 -0
  180. package/test-datapacks/test_decorators/data/test_decorators/function/on_tick/then_6.mcfunction +4 -0
  181. package/test-datapacks/test_decorators/data/test_decorators/function/on_tick.mcfunction +5 -0
  182. package/test-datapacks/test_decorators/data/test_decorators/function/run_decorator_tests.mcfunction +7 -0
  183. package/test-datapacks/test_decorators/data/test_decorators/function/setup_trigger_test.mcfunction +4 -0
  184. package/test-datapacks/test_decorators/data/test_decorators/function/start_slow_tick_test.mcfunction +4 -0
  185. package/test-datapacks/test_decorators/data/test_decorators/function/start_tick_test.mcfunction +4 -0
  186. package/test-datapacks/test_decorators/data/test_decorators/function/stop_tick_test.mcfunction +3 -0
  187. package/test-datapacks/test_decorators/pack.mcmeta +6 -0
  188. package/test-datapacks/test_decorators.mcrs +81 -0
  189. package/test-datapacks/test_events/data/minecraft/tags/function/load.json +5 -0
  190. package/test-datapacks/test_events/data/test_events/advancements/on_death_on_player_death.json +10 -0
  191. package/test-datapacks/test_events/data/test_events/function/__load.mcfunction +3 -0
  192. package/test-datapacks/test_events/data/test_events/function/on_player_death.mcfunction +3 -0
  193. package/test-datapacks/test_events/data/test_events/function/run_event_tests.mcfunction +5 -0
  194. package/test-datapacks/test_events/data/test_events/function/setup_events.mcfunction +3 -0
  195. package/test-datapacks/test_events/data/test_events/function/spawn_test_entity.mcfunction +3 -0
  196. package/test-datapacks/test_events/data/test_events/function/test_advancement_event.mcfunction +4 -0
  197. package/test-datapacks/test_events/pack.mcmeta +6 -0
  198. package/test-datapacks/test_events.mcrs +37 -0
  199. package/test-datapacks/test_fstrings/data/minecraft/tags/function/load.json +5 -0
  200. package/test-datapacks/test_fstrings/data/test_fstrings/function/__load.mcfunction +10 -0
  201. package/test-datapacks/test_fstrings/data/test_fstrings/function/run_fstring_tests.mcfunction +15 -0
  202. package/test-datapacks/test_fstrings/data/test_fstrings/function/test_actionbar_fstring.mcfunction +4 -0
  203. package/test-datapacks/test_fstrings/data/test_fstrings/function/test_announce.mcfunction +3 -0
  204. package/test-datapacks/test_fstrings/data/test_fstrings/function/test_multi_var_fstring.mcfunction +9 -0
  205. package/test-datapacks/test_fstrings/data/test_fstrings/function/test_say_fstring.mcfunction +4 -0
  206. package/test-datapacks/test_fstrings/data/test_fstrings/function/test_tell.mcfunction +3 -0
  207. package/test-datapacks/test_fstrings/data/test_fstrings/function/test_title_fstring.mcfunction +4 -0
  208. package/test-datapacks/test_fstrings/pack.mcmeta +6 -0
  209. package/test-datapacks/test_fstrings.mcrs +58 -0
  210. package/test-datapacks/test_timers/data/minecraft/tags/function/load.json +5 -0
  211. package/test-datapacks/test_timers/data/test_timers/function/__interval_0.mcfunction +3 -0
  212. package/test-datapacks/test_timers/data/test_timers/function/__interval_body_0.mcfunction +5 -0
  213. package/test-datapacks/test_timers/data/test_timers/function/__load.mcfunction +5 -0
  214. package/test-datapacks/test_timers/data/test_timers/function/__timeout_0.mcfunction +2 -0
  215. package/test-datapacks/test_timers/data/test_timers/function/run_timer_tests.mcfunction +5 -0
  216. package/test-datapacks/test_timers/data/test_timers/function/test_set_interval.mcfunction +5 -0
  217. package/test-datapacks/test_timers/data/test_timers/function/test_set_timeout.mcfunction +3 -0
  218. package/test-datapacks/test_timers/pack.mcmeta +6 -0
  219. package/test-datapacks/test_timers.mcrs +35 -0
@@ -0,0 +1,67 @@
1
+ # RedScript In-Game Test Datapacks
2
+
3
+ These datapacks test various RedScript features in-game.
4
+
5
+ ## Installation
6
+
7
+ Copy the test folders to your Minecraft world's `datapacks` folder:
8
+
9
+ ```
10
+ .minecraft/saves/<world>/datapacks/
11
+ ├── test_control_flow/
12
+ ├── test_decorators/
13
+ ├── test_events/
14
+ ├── test_fstrings/
15
+ └── test_timers/
16
+ ```
17
+
18
+ Run `/reload` in-game.
19
+
20
+ ## Test Commands
21
+
22
+ ### Control Flow Tests
23
+ ```
24
+ /function test_control_flow:run_control_flow_tests
25
+ ```
26
+ Tests: `if`/`else`, `for`, `while`, `foreach`, `break`
27
+
28
+ ### Decorator Tests
29
+ ```
30
+ /function test_decorators:run_decorator_tests
31
+ /function test_decorators:start_tick_test
32
+ /function test_decorators:start_slow_tick_test
33
+ /function test_decorators:setup_trigger_test
34
+ ```
35
+ Tests: `@load`, `@tick`, `@tick(rate=N)`, `@on_trigger`
36
+
37
+ ### Event Tests
38
+ ```
39
+ /function test_events:run_event_tests
40
+ ```
41
+ Tests: `@on_death` (need to die in survival mode)
42
+
43
+ ### F-String & Output Tests
44
+ ```
45
+ /function test_fstrings:run_fstring_tests
46
+ ```
47
+ Tests: `say`, `title`, `actionbar`, `tell`, f-strings with variables
48
+
49
+ ### Timer Tests
50
+ ```
51
+ /function test_timers:run_timer_tests
52
+ /function test_timers:test_set_timeout
53
+ /function test_timers:test_set_interval
54
+ ```
55
+ Tests: `setTimeout`, `setInterval`
56
+
57
+ ## Expected Results
58
+
59
+ - `[PASS]` — Test passed
60
+ - `[FAIL]` — Test failed
61
+ - `[INFO]` — Informational message
62
+
63
+ ## Notes
64
+
65
+ - Run in survival mode for death events
66
+ - Some tests require waiting (timers, tick tests)
67
+ - Use `/reload` between test runs to reset state
@@ -0,0 +1,5 @@
1
+ {
2
+ "values": [
3
+ "test_control_flow:__load"
4
+ ]
5
+ }
@@ -0,0 +1,41 @@
1
+ # RedScript runtime init
2
+ scoreboard objectives add rs dummy
3
+ scoreboard players set $test_counter rs 0
4
+ scoreboard players set $const_10 rs 10
5
+ scoreboard players set $const_5 rs 5
6
+ scoreboard players set $const_0 rs 0
7
+ scoreboard players set $const_20 rs 20
8
+ scoreboard players set $const_50 rs 50
9
+ scoreboard players set $const_25 rs 25
10
+ scoreboard players set $const_75 rs 75
11
+ scoreboard players set $const_0 rs 0
12
+ scoreboard players set $const_1 rs 1
13
+ scoreboard players set $const_5 rs 5
14
+ scoreboard players set $const_15 rs 15
15
+ scoreboard players set $const_2 rs 2
16
+ scoreboard players set $const_3 rs 3
17
+ scoreboard players set $const_6 rs 6
18
+ scoreboard players set $const_0 rs 0
19
+ scoreboard players set $const_3 rs 3
20
+ scoreboard players set $const_1 rs 1
21
+ scoreboard players set $const_5 rs 5
22
+ scoreboard players set $const_1 rs 1
23
+ scoreboard players set $const_0 rs 0
24
+ scoreboard players set $const_3 rs 3
25
+ scoreboard players set $const_0 rs 0
26
+ scoreboard players set $const_10 rs 10
27
+ scoreboard players set $const_5 rs 5
28
+ scoreboard players set $const_1 rs 1
29
+ scoreboard players set $const_0 rs 0
30
+ scoreboard players set $const_10 rs 10
31
+ scoreboard players set $const_2 rs 2
32
+ scoreboard players set $const_1 rs 1
33
+ scoreboard players set $const_20 rs 20
34
+ scoreboard players set $const_5 rs 5
35
+ scoreboard players set $const_10 rs 10
36
+ scoreboard players set $const_15 rs 15
37
+ scoreboard players set $const_100 rs 100
38
+ scoreboard players set $const_0 rs 0
39
+ scoreboard players set $const_2 rs 2
40
+ scoreboard players set $const_0 rs 0
41
+ scoreboard players set $const_75 rs 75
@@ -0,0 +1,21 @@
1
+ # block: entry
2
+ say === Control Flow Tests ===
3
+ function test_control_flow:test_if_else
4
+ scoreboard players operation $_50 rs = $ret rs
5
+ function test_control_flow:test_for_loop
6
+ scoreboard players operation $_51 rs = $ret rs
7
+ function test_control_flow:test_while_loop
8
+ scoreboard players operation $_52 rs = $ret rs
9
+ function test_control_flow:test_foreach_selector
10
+ scoreboard players operation $_53 rs = $ret rs
11
+ function test_control_flow:test_foreach_at
12
+ scoreboard players operation $_54 rs = $ret rs
13
+ function test_control_flow:test_break
14
+ scoreboard players operation $_55 rs = $ret rs
15
+ function test_control_flow:test_continue
16
+ scoreboard players operation $_56 rs = $ret rs
17
+ function test_control_flow:test_complex_conditions
18
+ scoreboard players operation $_57 rs = $ret rs
19
+ function test_control_flow:test_match
20
+ scoreboard players operation $_58 rs = $ret rs
21
+ say === Tests Complete ===
@@ -0,0 +1,3 @@
1
+ # block: else_7
2
+ say [FAIL] break: expected 5
3
+ function test_control_flow:test_break/merge_8
@@ -0,0 +1,3 @@
1
+ # block: else_8
2
+ say [FAIL] break: expected 5
3
+ function test_control_flow:test_break/merge_9
@@ -0,0 +1,5 @@
1
+ # block: for_body_1
2
+ scoreboard players set $_26 rs 0
3
+ execute if score $i rs = $const_5 rs run scoreboard players set $_26 rs 1
4
+ execute if score $_26 rs matches 1.. run function test_control_flow:test_break/then_4
5
+ execute if score $_26 rs matches ..0 run function test_control_flow:test_break/merge_6
@@ -0,0 +1,5 @@
1
+ # block: for_check_0
2
+ scoreboard players set $_25 rs 0
3
+ execute if score $i rs < $const_10 rs run scoreboard players set $_25 rs 1
4
+ execute if score $_25 rs matches 1.. run function test_control_flow:test_break/for_body_1
5
+ execute if score $_25 rs matches ..0 run function test_control_flow:test_break/for_exit_3
@@ -0,0 +1,5 @@
1
+ # block: for_continue_2
2
+ scoreboard players operation $_27 rs = $i rs
3
+ scoreboard players operation $_27 rs += $const_1 rs
4
+ scoreboard players operation $i rs = $_27 rs
5
+ function test_control_flow:test_break/for_check_0
@@ -0,0 +1,5 @@
1
+ # block: for_exit_2
2
+ scoreboard players set $_28 rs 0
3
+ execute if score $found rs = $const_5 rs run scoreboard players set $_28 rs 1
4
+ execute if score $_28 rs matches 1.. run function test_control_flow:test_break/then_6
5
+ execute if score $_28 rs matches ..0 run function test_control_flow:test_break/else_7
@@ -0,0 +1,5 @@
1
+ # block: for_exit_3
2
+ scoreboard players set $_28 rs 0
3
+ execute if score $found rs = $const_5 rs run scoreboard players set $_28 rs 1
4
+ execute if score $_28 rs matches 1.. run function test_control_flow:test_break/then_7
5
+ execute if score $_28 rs matches ..0 run function test_control_flow:test_break/else_8
@@ -0,0 +1,5 @@
1
+ # block: merge_5
2
+ scoreboard players operation $_27 rs = $i rs
3
+ scoreboard players operation $_27 rs += $const_1 rs
4
+ scoreboard players operation $i rs = $_27 rs
5
+ function test_control_flow:test_break/for_check_0
@@ -0,0 +1,2 @@
1
+ # block: merge_6
2
+ function test_control_flow:test_break/for_continue_2
@@ -0,0 +1,3 @@
1
+ # block: then_3
2
+ scoreboard players operation $found rs = $i rs
3
+ function test_control_flow:test_break/merge_5
@@ -0,0 +1,3 @@
1
+ # block: then_4
2
+ scoreboard players operation $found rs = $i rs
3
+ function test_control_flow:test_break/for_exit_3
@@ -0,0 +1,3 @@
1
+ # block: then_6
2
+ say [PASS] break: exited at i=5
3
+ function test_control_flow:test_break/merge_8
@@ -0,0 +1,3 @@
1
+ # block: then_7
2
+ say [PASS] break: exited at i=5
3
+ function test_control_flow:test_break/merge_9
@@ -0,0 +1,4 @@
1
+ # block: entry
2
+ scoreboard players set $found rs 0
3
+ scoreboard players set $i rs 0
4
+ function test_control_flow:test_break/for_check_0
@@ -0,0 +1,3 @@
1
+ # block: else_1
2
+ say [FAIL] AND: should be true
3
+ function test_control_flow:test_complex_conditions/merge_2
@@ -0,0 +1,3 @@
1
+ # block: else_10
2
+ say [FAIL] complex: should be true
3
+ function test_control_flow:test_complex_conditions/merge_11
@@ -0,0 +1,3 @@
1
+ # block: else_4
2
+ say [FAIL] OR: should be true
3
+ function test_control_flow:test_complex_conditions/merge_5
@@ -0,0 +1,3 @@
1
+ # block: else_7
2
+ say [FAIL] NOT: should be true
3
+ function test_control_flow:test_complex_conditions/merge_8
@@ -0,0 +1,9 @@
1
+ # block: merge_2
2
+ scoreboard players set $_38 rs 0
3
+ execute if score $a rs > $const_100 rs run scoreboard players set $_38 rs 1
4
+ scoreboard players set $_39 rs 0
5
+ execute if score $b rs = $const_10 rs run scoreboard players set $_39 rs 1
6
+ scoreboard players operation $_40 rs = $_38 rs
7
+ execute if score $_40 rs matches ..0 run scoreboard players operation $_40 rs = $_39 rs
8
+ execute if score $_40 rs matches 1.. run function test_control_flow:test_complex_conditions/then_3
9
+ execute if score $_40 rs matches ..0 run function test_control_flow:test_complex_conditions/else_4
@@ -0,0 +1,7 @@
1
+ # block: merge_5
2
+ scoreboard players set $_41 rs 0
3
+ execute if score $a rs > $b rs run scoreboard players set $_41 rs 1
4
+ scoreboard players set $_42 rs 0
5
+ execute if score $_41 rs = $const_0 rs run scoreboard players set $_42 rs 1
6
+ execute if score $_42 rs matches 1.. run function test_control_flow:test_complex_conditions/then_6
7
+ execute if score $_42 rs matches ..0 run function test_control_flow:test_complex_conditions/else_7
@@ -0,0 +1,13 @@
1
+ # block: merge_8
2
+ scoreboard players set $_43 rs 0
3
+ execute if score $a rs < $b rs run scoreboard players set $_43 rs 1
4
+ scoreboard players set $_44 rs 0
5
+ execute if score $b rs < $c rs run scoreboard players set $_44 rs 1
6
+ scoreboard players operation $_45 rs = $_43 rs
7
+ execute if score $_45 rs matches 1.. run scoreboard players operation $_45 rs = $_44 rs
8
+ scoreboard players set $_46 rs 0
9
+ execute if score $a rs > $c rs run scoreboard players set $_46 rs 1
10
+ scoreboard players operation $_47 rs = $_43 rs
11
+ execute if score $_47 rs matches ..0 run scoreboard players operation $_47 rs = $_46 rs
12
+ execute if score $_47 rs matches 1.. run function test_control_flow:test_complex_conditions/then_9
13
+ execute if score $_47 rs matches ..0 run function test_control_flow:test_complex_conditions/else_10
@@ -0,0 +1,3 @@
1
+ # block: then_0
2
+ say [PASS] AND: a < b && b < c
3
+ function test_control_flow:test_complex_conditions/merge_2
@@ -0,0 +1,3 @@
1
+ # block: then_3
2
+ say [PASS] OR: a > 100 || b == 10
3
+ function test_control_flow:test_complex_conditions/merge_5
@@ -0,0 +1,3 @@
1
+ # block: then_6
2
+ say [PASS] NOT: !(a > b)
3
+ function test_control_flow:test_complex_conditions/merge_8
@@ -0,0 +1,3 @@
1
+ # block: then_9
2
+ say [PASS] complex: (a<b && b<c) || (a>c)
3
+ function test_control_flow:test_complex_conditions/merge_11
@@ -0,0 +1,12 @@
1
+ # block: entry
2
+ scoreboard players set $a rs 5
3
+ scoreboard players set $b rs 10
4
+ scoreboard players set $c rs 15
5
+ scoreboard players set $_35 rs 0
6
+ execute if score $const_5 rs < $const_10 rs run scoreboard players set $_35 rs 1
7
+ scoreboard players set $_36 rs 0
8
+ execute if score $const_10 rs < $const_15 rs run scoreboard players set $_36 rs 1
9
+ scoreboard players operation $_37 rs = $_35 rs
10
+ execute if score $_37 rs matches 1.. run scoreboard players operation $_37 rs = $_36 rs
11
+ execute if score $_37 rs matches 1.. run function test_control_flow:test_complex_conditions/then_0
12
+ execute if score $_37 rs matches ..0 run function test_control_flow:test_complex_conditions/else_1
@@ -0,0 +1,3 @@
1
+ # block: else_7
2
+ say [FAIL] continue: expected 20
3
+ function test_control_flow:test_continue/merge_8
@@ -0,0 +1,3 @@
1
+ # block: else_8
2
+ say [FAIL] continue: expected 20
3
+ function test_control_flow:test_continue/merge_9
@@ -0,0 +1,7 @@
1
+ # block: for_body_1
2
+ scoreboard players operation $_30 rs = $i rs
3
+ scoreboard players operation $_30 rs %= $const_2 rs
4
+ scoreboard players set $_31 rs 0
5
+ execute unless score $_30 rs = $const_0 rs run scoreboard players set $_31 rs 1
6
+ execute if score $_31 rs matches 1.. run function test_control_flow:test_continue/then_4
7
+ execute if score $_31 rs matches ..0 run function test_control_flow:test_continue/merge_6
@@ -0,0 +1,5 @@
1
+ # block: for_check_0
2
+ scoreboard players set $_29 rs 0
3
+ execute if score $i rs < $const_10 rs run scoreboard players set $_29 rs 1
4
+ execute if score $_29 rs matches 1.. run function test_control_flow:test_continue/for_body_1
5
+ execute if score $_29 rs matches ..0 run function test_control_flow:test_continue/for_exit_3
@@ -0,0 +1,5 @@
1
+ # block: for_continue_2
2
+ scoreboard players operation $_33 rs = $i rs
3
+ scoreboard players operation $_33 rs += $const_1 rs
4
+ scoreboard players operation $i rs = $_33 rs
5
+ function test_control_flow:test_continue/for_check_0
@@ -0,0 +1,5 @@
1
+ # block: for_exit_2
2
+ scoreboard players set $_34 rs 0
3
+ execute if score $sum rs = $const_20 rs run scoreboard players set $_34 rs 1
4
+ execute if score $_34 rs matches 1.. run function test_control_flow:test_continue/then_6
5
+ execute if score $_34 rs matches ..0 run function test_control_flow:test_continue/else_7
@@ -0,0 +1,5 @@
1
+ # block: for_exit_3
2
+ scoreboard players set $_34 rs 0
3
+ execute if score $sum rs = $const_20 rs run scoreboard players set $_34 rs 1
4
+ execute if score $_34 rs matches 1.. run function test_control_flow:test_continue/then_7
5
+ execute if score $_34 rs matches ..0 run function test_control_flow:test_continue/else_8
@@ -0,0 +1,8 @@
1
+ # block: merge_5
2
+ scoreboard players operation $_32 rs = $sum rs
3
+ scoreboard players operation $_32 rs += $i rs
4
+ scoreboard players operation $sum rs = $_32 rs
5
+ scoreboard players operation $_33 rs = $i rs
6
+ scoreboard players operation $_33 rs += $const_1 rs
7
+ scoreboard players operation $i rs = $_33 rs
8
+ function test_control_flow:test_continue/for_check_0
@@ -0,0 +1,5 @@
1
+ # block: merge_6
2
+ scoreboard players operation $_32 rs = $sum rs
3
+ scoreboard players operation $_32 rs += $i rs
4
+ scoreboard players operation $sum rs = $_32 rs
5
+ function test_control_flow:test_continue/for_continue_2
@@ -0,0 +1,2 @@
1
+ # block: then_3
2
+ function test_control_flow:test_continue/merge_5
@@ -0,0 +1,2 @@
1
+ # block: then_4
2
+ function test_control_flow:test_continue/for_continue_2
@@ -0,0 +1,3 @@
1
+ # block: then_6
2
+ say [PASS] continue: sum of evens = 20
3
+ function test_control_flow:test_continue/merge_8
@@ -0,0 +1,3 @@
1
+ # block: then_7
2
+ say [PASS] continue: sum of evens = 20
3
+ function test_control_flow:test_continue/merge_9
@@ -0,0 +1,4 @@
1
+ # block: entry
2
+ scoreboard players set $sum rs 0
3
+ scoreboard players set $i rs 0
4
+ function test_control_flow:test_continue/for_check_0
@@ -0,0 +1,3 @@
1
+ # block: else_13
2
+ say [FAIL] nested for: expected 6
3
+ function test_control_flow:test_for_loop/merge_14
@@ -0,0 +1,3 @@
1
+ # block: else_16
2
+ say [FAIL] nested for: expected 6
3
+ function test_control_flow:test_for_loop/merge_17
@@ -0,0 +1,3 @@
1
+ # block: else_4
2
+ say [FAIL] for loop: expected 15
3
+ function test_control_flow:test_for_loop/merge_5
@@ -0,0 +1,3 @@
1
+ # block: else_5
2
+ say [FAIL] for loop: expected 15
3
+ function test_control_flow:test_for_loop/merge_6
@@ -0,0 +1,5 @@
1
+ # block: for_body_1
2
+ scoreboard players operation $_7 rs = $sum rs
3
+ scoreboard players operation $_7 rs += $i rs
4
+ scoreboard players operation $sum rs = $_7 rs
5
+ function test_control_flow:test_for_loop/for_continue_2
@@ -0,0 +1,8 @@
1
+ # block: for_body_10
2
+ scoreboard players operation $_12 rs = $product rs
3
+ scoreboard players operation $_12 rs += $const_1 rs
4
+ scoreboard players operation $product rs = $_12 rs
5
+ scoreboard players operation $_13 rs = $b rs
6
+ scoreboard players operation $_13 rs += $const_1 rs
7
+ scoreboard players operation $b rs = $_13 rs
8
+ function test_control_flow:test_for_loop/for_check_9
@@ -0,0 +1,5 @@
1
+ # block: for_body_12
2
+ scoreboard players operation $_12 rs = $product rs
3
+ scoreboard players operation $_12 rs += $const_1 rs
4
+ scoreboard players operation $product rs = $_12 rs
5
+ function test_control_flow:test_for_loop/for_continue_13
@@ -0,0 +1,3 @@
1
+ # block: for_body_7
2
+ scoreboard players set $b rs 1
3
+ function test_control_flow:test_for_loop/for_check_9
@@ -0,0 +1,3 @@
1
+ # block: for_body_8
2
+ scoreboard players set $b rs 1
3
+ function test_control_flow:test_for_loop/for_check_11
@@ -0,0 +1,5 @@
1
+ # block: for_check_0
2
+ scoreboard players set $_6 rs 0
3
+ execute if score $i rs <= $const_5 rs run scoreboard players set $_6 rs 1
4
+ execute if score $_6 rs matches 1.. run function test_control_flow:test_for_loop/for_body_1
5
+ execute if score $_6 rs matches ..0 run function test_control_flow:test_for_loop/for_exit_3
@@ -0,0 +1,5 @@
1
+ # block: for_check_11
2
+ scoreboard players set $_11 rs 0
3
+ execute if score $b rs <= $const_3 rs run scoreboard players set $_11 rs 1
4
+ execute if score $_11 rs matches 1.. run function test_control_flow:test_for_loop/for_body_12
5
+ execute if score $_11 rs matches ..0 run function test_control_flow:test_for_loop/for_exit_14
@@ -0,0 +1,5 @@
1
+ # block: for_check_6
2
+ scoreboard players set $_10 rs 0
3
+ execute if score $a rs <= $const_2 rs run scoreboard players set $_10 rs 1
4
+ execute if score $_10 rs matches 1.. run function test_control_flow:test_for_loop/for_body_7
5
+ execute if score $_10 rs matches ..0 run function test_control_flow:test_for_loop/for_exit_8
@@ -0,0 +1,5 @@
1
+ # block: for_check_7
2
+ scoreboard players set $_10 rs 0
3
+ execute if score $a rs <= $const_2 rs run scoreboard players set $_10 rs 1
4
+ execute if score $_10 rs matches 1.. run function test_control_flow:test_for_loop/for_body_8
5
+ execute if score $_10 rs matches ..0 run function test_control_flow:test_for_loop/for_exit_10
@@ -0,0 +1,5 @@
1
+ # block: for_check_9
2
+ scoreboard players set $_11 rs 0
3
+ execute if score $b rs <= $const_3 rs run scoreboard players set $_11 rs 1
4
+ execute if score $_11 rs matches 1.. run function test_control_flow:test_for_loop/for_body_10
5
+ execute if score $_11 rs matches ..0 run function test_control_flow:test_for_loop/for_exit_11
@@ -0,0 +1,5 @@
1
+ # block: for_continue_13
2
+ scoreboard players operation $_13 rs = $b rs
3
+ scoreboard players operation $_13 rs += $const_1 rs
4
+ scoreboard players operation $b rs = $_13 rs
5
+ function test_control_flow:test_for_loop/for_check_11
@@ -0,0 +1,5 @@
1
+ # block: for_continue_2
2
+ scoreboard players operation $_8 rs = $i rs
3
+ scoreboard players operation $_8 rs += $const_1 rs
4
+ scoreboard players operation $i rs = $_8 rs
5
+ function test_control_flow:test_for_loop/for_check_0
@@ -0,0 +1,5 @@
1
+ # block: for_continue_9
2
+ scoreboard players operation $_14 rs = $a rs
3
+ scoreboard players operation $_14 rs += $const_1 rs
4
+ scoreboard players operation $a rs = $_14 rs
5
+ function test_control_flow:test_for_loop/for_check_7
@@ -0,0 +1,5 @@
1
+ # block: for_exit_10
2
+ scoreboard players set $_15 rs 0
3
+ execute if score $product rs = $const_6 rs run scoreboard players set $_15 rs 1
4
+ execute if score $_15 rs matches 1.. run function test_control_flow:test_for_loop/then_15
5
+ execute if score $_15 rs matches ..0 run function test_control_flow:test_for_loop/else_16
@@ -0,0 +1,5 @@
1
+ # block: for_exit_11
2
+ scoreboard players operation $_14 rs = $a rs
3
+ scoreboard players operation $_14 rs += $const_1 rs
4
+ scoreboard players operation $a rs = $_14 rs
5
+ function test_control_flow:test_for_loop/for_check_6
@@ -0,0 +1,2 @@
1
+ # block: for_exit_14
2
+ function test_control_flow:test_for_loop/for_continue_9
@@ -0,0 +1,5 @@
1
+ # block: for_exit_2
2
+ scoreboard players set $_9 rs 0
3
+ execute if score $sum rs = $const_15 rs run scoreboard players set $_9 rs 1
4
+ execute if score $_9 rs matches 1.. run function test_control_flow:test_for_loop/then_3
5
+ execute if score $_9 rs matches ..0 run function test_control_flow:test_for_loop/else_4
@@ -0,0 +1,5 @@
1
+ # block: for_exit_3
2
+ scoreboard players set $_9 rs 0
3
+ execute if score $sum rs = $const_15 rs run scoreboard players set $_9 rs 1
4
+ execute if score $_9 rs matches 1.. run function test_control_flow:test_for_loop/then_4
5
+ execute if score $_9 rs matches ..0 run function test_control_flow:test_for_loop/else_5
@@ -0,0 +1,5 @@
1
+ # block: for_exit_8
2
+ scoreboard players set $_15 rs 0
3
+ execute if score $product rs = $const_6 rs run scoreboard players set $_15 rs 1
4
+ execute if score $_15 rs matches 1.. run function test_control_flow:test_for_loop/then_12
5
+ execute if score $_15 rs matches ..0 run function test_control_flow:test_for_loop/else_13
@@ -0,0 +1,4 @@
1
+ # block: merge_5
2
+ scoreboard players set $product rs 0
3
+ scoreboard players set $a rs 1
4
+ function test_control_flow:test_for_loop/for_check_6
@@ -0,0 +1,4 @@
1
+ # block: merge_6
2
+ scoreboard players set $product rs 0
3
+ scoreboard players set $a rs 1
4
+ function test_control_flow:test_for_loop/for_check_7
@@ -0,0 +1,3 @@
1
+ # block: then_12
2
+ say [PASS] nested for: 2*3 iterations = 6
3
+ function test_control_flow:test_for_loop/merge_14
@@ -0,0 +1,3 @@
1
+ # block: then_15
2
+ say [PASS] nested for: 2*3 iterations = 6
3
+ function test_control_flow:test_for_loop/merge_17
@@ -0,0 +1,3 @@
1
+ # block: then_3
2
+ say [PASS] for loop: sum 1..5 = 15
3
+ function test_control_flow:test_for_loop/merge_5
@@ -0,0 +1,3 @@
1
+ # block: then_4
2
+ say [PASS] for loop: sum 1..5 = 15
3
+ function test_control_flow:test_for_loop/merge_6