tests = [ { name = "Test if collisions are executed sorted in object index order NOT in instance creation order" butterscotchArgs = ["object-index-iteration-test/data.win", "--headless", "--exit-at-frame", "1"] expectedStdoutOutput = [ [ "Game: start frame", "Game: colliding with wall 2", "Game: colliding with wall 1", "Game: colliding with wall 3" ] ] }, { name = "Test Loritta and the Stars" butterscotchArgs = ["loritta-and-the-stars/data.win", "--playback-inputs", "loritta-and-the-stars/gameplay.json", "--exit-at-frame", "9000", "--screenshot-surfaces-at-frame", "9000", "--screenshot-surfaces", "loritta-and-the-stars/actual.%d.%d.png", "--headless"] expectedScreenshots = [ { expected = "loritta-and-the-stars/expected.9000.0.png" actual = "loritta-and-the-stars/actual.9000.0.png" } ] }, { name = "Test Undertale PT-BR (WinPack/TranslaTale WAD)" commercialGame = true butterscotchArgs = ["undertale-ptbr-winpack/data.win", "--playback-inputs", "undertale-ptbr-winpack/gameplay.json", "--exit-at-frame", "730", "--screenshot-surfaces-at-frame", "730", "--screenshot-surfaces", "undertale-ptbr-winpack/actual.%d.%d.png", "--headless", "--lazy-textures"] expectedStderrOutput = [ [ "DataWin: Allocated new TPAG! Was the WAD built with WinPack? (TranslaTale)" ] ] expectedScreenshots = [ { expected = "undertale-ptbr-winpack/expected.730.0.png" actual = "undertale-ptbr-winpack/actual.730.0.png" } ] }, { name = "Test Underfavela (Bogus Sprite Types and Bogus AGPR padding checks)" commercialGame = true butterscotchArgs = ["underfavela/data.win", "--seed", "0", "--playback-inputs", "underfavela/gameplay.json", "--screenshot-surfaces", "underfavela/actual.%d.%d.png", "--screenshot-surfaces-at-frame", "2000", "--exit-at-frame", "2000", "--headless", "--lazy-textures"] expectedScreenshots = [ { expected = "underfavela/expected.2000.0.png" actual = "underfavela/actual.2000.0.png" } ] }, { name = "Test Simple Structs, Methods and Dynamic Methods" commercialGame = false butterscotchArgs = ["simple-structs-methods-and-dynamic-methods/data.win", "--exit-at-frame", "1"] expectedStdoutOutput = [ [ "Game: My name is Loritta Morenitta!", "Game: Wow, you want to give stars to me?!", "Game: My new stars are 1437", "Game: My name is Loritta Morenitta!", "Game: Width is 1366 and the height is 768!", "Game: Howdy! This was invoked via a dynamic method - x: 512, y: 224", "Game: Howdy! This was invoked via a dynamic method, but now bound to a asset reference woo - x: 640, y: 224", "Game: Name: Loritta Morenitta", "Game: Stars: 1437", "Game: Hiii, my name is Pantufa!", "Game: This is another function!!" ] ] }, { name = "Test Out of Lives Event Ordering" commercialGame = false butterscotchArgs = ["lives-and-health-events-check/data.win", "--exit-at-frame", "20", "--headless"] expectedStdoutOutput = [ [ "Game: Current lives is 10, decreasing one...", "Game: Current lives is 9, decreasing one...", "Game: Current lives is 8, decreasing one...", "Game: Current lives is 7, decreasing one...", "Game: Current lives is 6, decreasing one...", "Game: Current lives is 5, decreasing one...", "Game: Current lives is 4, decreasing one...", "Game: Current lives is 3, decreasing one...", "Game: Current lives is 2, decreasing one...", "Game: Current lives is 1, decreasing one...", "Game: Creating a new dummy object BEFORE changing the lives", "Game: Dummy object created!", "Game: I don't have any more lives! My instance ID is 100001", "Game: I don't have any more lives! My instance ID is 100002", "Game: I don't have any more lives! My instance ID is 100004", "Game: Creating a new dummy object AFTER changing the lives, it should NOT receive the event", "Game: If this message is dispatched after the obj_dummy messages, then events are dispatched inline!" ] ] }, { name = "Test if path_add is creating paths closed by default (DELTARUNE Chapter 4 - Jackenstein)" commercialGame = true butterscotchArgs = ["deltarune-chapter4-105-beta/data.win", "--playback-inputs", "deltarune-chapter4-105-beta/jackenstein-path-test.json", "--lazy-textures", "--seed", "0", "--screenshot-surfaces", "deltarune-chapter4-105-beta/actual.jackenstein-path-test.%d.%d.png", "--screenshot-surfaces-at-frame", "9473", "--screenshot-surfaces-at-frame", "9474", "--headless", "--exit-at-frame", "9474", "--save-folder", "deltarune-chapter4-105-beta/jackenstein/"] expectedScreenshots = [ { expected = "deltarune-chapter4-105-beta/expected.jackenstein-path-test.9473.0.png" actual = "deltarune-chapter4-105-beta/actual.jackenstein-path-test.9473.0.png" }, { expected = "deltarune-chapter4-105-beta/expected.jackenstein-path-test.9474.0.png" actual = "deltarune-chapter4-105-beta/actual.jackenstein-path-test.9474.0.png" } ] }, { name = "Test struct_get_names and variable_instance_get_names" commercialGame = false butterscotchArgs = ["struct-get-names-test/data.win", "--exit-at-frame", "1", "--headless"] # The order is not guaranteed by GameMaker, so we also won't check for the exact order expectedStdoutOutput = [ [ "Game: [struct(struct_get_names)] Name is gabrielaName" ], [ "Game: [struct(struct_get_names)] Name is lorittaName" ], [ "Game: [struct(struct_get_names)] Name is randomFunction" ], [ "Game: [struct(struct_get_names)] Name is pantufaName" ], [ "Game: [selfinstance(struct_get_names)] Name is pizzaTowerName" ], [ "Game: [selfinstance(struct_get_names)] Name is variableInstanceGetNamesAndPrint" ], [ "Game: [selfinstance(struct_get_names)] Name is gameNameFunction" ], [ "Game: [selfinstance(struct_get_names)] Name is undertaleName" ], [ "Game: [selfinstance(struct_get_names)] Name is structGetNamesAndPrint" ], [ "Game: [selfinstance(struct_get_names)] Name is deltaruneName" ], [ "Game: [global(struct_get_names)] Name is susie" ], [ "Game: [global(struct_get_names)] Name is ___struct___0" ], [ "Game: [global(struct_get_names)] Name is ralsei" ], [ "Game: [global(struct_get_names)] Name is owo" ], [ "Game: [global(struct_get_names)] Name is kris" ], [ "Game: [struct(variable_instance_get_names)] Name is gabrielaName" ], [ "Game: [struct(variable_instance_get_names)] Name is lorittaName" ], [ "Game: [struct(variable_instance_get_names)] Name is randomFunction" ], [ "Game: [struct(variable_instance_get_names)] Name is pantufaName" ], [ "Game: [selfinstance(variable_instance_get_names)] Name is pizzaTowerName" ], [ "Game: [selfinstance(variable_instance_get_names)] Name is variableInstanceGetNamesAndPrint" ], [ "Game: [selfinstance(variable_instance_get_names)] Name is gameNameFunction" ], [ "Game: [selfinstance(variable_instance_get_names)] Name is undertaleName" ], [ "Game: [selfinstance(variable_instance_get_names)] Name is structGetNamesAndPrint" ], [ "Game: [selfinstance(variable_instance_get_names)] Name is deltaruneName" ], [ "Game: [global(variable_instance_get_names)] Name is susie" ], [ "Game: [global(variable_instance_get_names)] Name is ___struct___0" ], [ "Game: [global(variable_instance_get_names)] Name is ralsei" ], [ "Game: [global(variable_instance_get_names)] Name is owo" ], [ "Game: [global(variable_instance_get_names)] Name is kris" ], ] }, { name = "Test Stack Unwinding" commercialGame = false butterscotchArgs = ["stack-unwinding/data.win", "--exit-at-frame", "1", "--headless"] expectedStdoutOutput = [ [ "Game: Exited loop! Current count is 2047" ], ] }, { name = "Test try ... catch ... finally" commercialGame = false butterscotchArgs = ["try-catch-finally-test/data.win", "--exit-at-frame", "1", "--headless"] expectedStderrOutput = [ [ "VM: The exception handler frame stack is 0, but we have a pending exception to be dispatched! This would've technically crashed the game in the original runner... or we aren't handling exceptions correctly. We'll swallow the exception and hope for the best... (Exception: b)" ] ] expectedStdoutOutput = [ [ "Game: Trying to call invalid function...", "Game: Oops, exception on nested block! Here's the exception information (struct):", "Game: CALLV with unresolvable function reference" ], # We split up because it prints all the values of the struct, and some of them are not implemented in Butterscotch yet [ "Game: Nested block finally, calling yet another unknown function", "Game: Oops, exception!", "Game: Finally", "Game: Calling unknown function inside script (without try catch, should be caught by the callee)", "Game: Oops, exception from script!", "Game: Finally from script", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 0", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 1", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 2", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 3", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 4", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 5", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 6", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 7", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 8", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 9", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 10", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 11", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 12", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 13", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 14", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 15", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 16", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 17", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 18", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 19", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 20", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 21", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 22", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 23", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 24", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 25", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 26", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 27", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 28", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 29", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 30", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 31", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 32", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 33", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 34", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 35", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 36", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 37", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 38", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 39", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 40", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 41", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 42", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 43", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 44", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 45", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 46", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 47", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 48", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 49", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 50", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 51", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 52", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 53", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 54", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 55", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 56", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 57", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 58", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 59", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 60", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 61", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 62", "Game: This should be executed anyway because we are in the finally block", "Game: We aren't going to do anything extraordinary here... This is to test if we are popping the stack even on non-failure - This should NOT go to the catch block - Iterations: 63", "Game: This should be executed anyway because we are in the finally block", "Game: Throwing a custom exception...", "Game: Caught custom exception!", "Game: Finally block of the custom exception", "Game: Try without catch, we will throw a exception here", "Game: This should be ran anyhow", "Game: I caught a Try without catch exception", "Game: The previous message should be a Try without catch exception", "Game: Yet another try block up ahead", "Game: Throwing inside a try and throwing inside the catch with a finally too...", "Game: Exception caught! Now let's throw inside a catch..." ] ] } ]