diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fbea6971d..95377dd6d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,11 +7,9 @@ on: branches: [main] jobs: - butterscotch-linux-x86_64: - name: Butterscotch Tests (GLFW/Linux x86_64) + build-linux-x86_64: + name: Build Butterscotch (GLFW/Linux x86_64) runs-on: ubuntu-latest - env: - DOWNLOAD_COMMERCIAL_GAMES: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} steps: - uses: actions/checkout@v4 @@ -30,6 +28,30 @@ jobs: - name: Build Butterscotch run: cmake --build build -j$(nproc) + - name: Upload Butterscotch binary + uses: actions/upload-artifact@v4 + with: + name: butterscotch-linux-x86_64 + path: build/butterscotch + + butterscotch-linux-x86_64: + name: Butterscotch Tests (GLFW/Linux x86_64) + runs-on: ubuntu-latest + needs: build-linux-x86_64 + env: + DOWNLOAD_COMMERCIAL_GAMES: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} + steps: + - uses: actions/checkout@v4 + + - name: Download Butterscotch binary + uses: actions/download-artifact@v4 + with: + name: butterscotch-linux-x86_64 + path: build + + - name: Mark Butterscotch binary executable + run: chmod +x build/butterscotch + - name: Set up JDK 21 uses: actions/setup-java@v4 with: @@ -71,3 +93,33 @@ jobs: path: | tests/**/actual.*.png if-no-files-found: ignore + + automated-ci-paths-linux-x86_64: + name: Automated CI Paths Test (GLFW/Linux x86_64) + runs-on: ubuntu-latest + needs: build-linux-x86_64 + steps: + - uses: actions/checkout@v4 + + - name: Download Butterscotch binary + uses: actions/download-artifact@v4 + with: + name: butterscotch-linux-x86_64 + path: build + + - name: Mark binaries and scripts executable + run: | + chmod +x build/butterscotch + chmod +x tests/automated-ci/paths/test.sh + + - name: Run paths game and validate output + shell: bash + run: | + set -euo pipefail + + test_path="${{ github.workspace }}/tests/automated-ci/paths/path_test" + binary="${{ github.workspace }}/build/butterscotch" + script="${{ github.workspace }}/tests/automated-ci/paths/test.sh" + + timeout 120s "$script" "$binary" "$test_path" + diff --git a/tests/automated-ci/paths/gm-project/.gitattributes b/tests/automated-ci/paths/gm-project/.gitattributes new file mode 100644 index 000000000..0330114b6 --- /dev/null +++ b/tests/automated-ci/paths/gm-project/.gitattributes @@ -0,0 +1,8 @@ +# Ignore .yy files for language statistics +*.yy linguist-generated=true + +# force LF for metadata files for merge simplicity +*.gml text eol=lf +*.yy text eol=lf +*.yyp text eol=lf +*.json text eol=lf \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/Path Test.yyp b/tests/automated-ci/paths/gm-project/Path Test.yyp new file mode 100644 index 000000000..20ce65cfc --- /dev/null +++ b/tests/automated-ci/paths/gm-project/Path Test.yyp @@ -0,0 +1,35 @@ +{ + "$GMProject":"v1", + "%Name":"Path Test", + "AudioGroups":[ + {"$GMAudioGroup":"v1","%Name":"audiogroup_default","exportDir":"","name":"audiogroup_default","resourceType":"GMAudioGroup","resourceVersion":"2.0","targets":-1,}, + ], + "configs":{ + "children":[], + "name":"Default", + }, + "defaultScriptType":1, + "Folders":[], + "ForcedPrefabProjectReferences":[], + "IncludedFiles":[], + "isEcma":false, + "LibraryEmitters":[], + "MetaData":{ + "IDEVersion":"2026.0.0.16", + }, + "name":"Path Test", + "resources":[ + {"id":{"name":"obj_mover","path":"objects/obj_mover/obj_mover.yy",},}, + {"id":{"name":"Object1","path":"objects/Object1/Object1.yy",},}, + {"id":{"name":"Room1","path":"rooms/Room1/Room1.yy",},}, + ], + "resourceType":"GMProject", + "resourceVersion":"2.0", + "RoomOrderNodes":[ + {"roomId":{"name":"Room1","path":"rooms/Room1/Room1.yy",},}, + ], + "templateType":"game", + "TextureGroups":[ + {"$GMTextureGroup":"","%Name":"Default","autocrop":true,"border":2,"compressFormat":"bz2","customOptions":"","directory":"","groupParent":null,"isScaled":true,"loadType":"default","mipsToGenerate":0,"name":"Default","resourceType":"GMTextureGroup","resourceVersion":"2.0","targets":-1,}, + ], +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/objects/Object1/Alarm_0.gml b/tests/automated-ci/paths/gm-project/objects/Object1/Alarm_0.gml new file mode 100644 index 000000000..fa98be635 --- /dev/null +++ b/tests/automated-ci/paths/gm-project/objects/Object1/Alarm_0.gml @@ -0,0 +1,15 @@ +show_debug_message("===== DELETE ====="); + +path_delete(global.test_path); + +show_debug_message("exists after delete = " + string(path_exists(global.test_path))); + +show_debug_message("===== INVALID PATH ====="); + +var bad = 123456789; + +show_debug_message("exists = " + string(path_exists(bad))); + +show_debug_message("===== PATH TEST END ====="); + +game_end(); \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/objects/Object1/Create_0.gml b/tests/automated-ci/paths/gm-project/objects/Object1/Create_0.gml new file mode 100644 index 000000000..81131777b --- /dev/null +++ b/tests/automated-ci/paths/gm-project/objects/Object1/Create_0.gml @@ -0,0 +1,105 @@ +show_debug_message("===== PATH TEST BEGIN ====="); + +function dump_path(p) +{ + show_debug_message("-------------------------"); + show_debug_message("exists = " + string(path_exists(p))); + + if (!path_exists(p)) + return; + + show_debug_message("length = " + string(path_get_length(p))); + show_debug_message("points = " + string(path_get_number(p))); + show_debug_message("closed = " + string(path_get_closed(p))); + show_debug_message("kind = " + string(path_get_kind(p))); + show_debug_message("precision = " + string(path_get_precision(p))); + + var n = path_get_number(p); + + for (var i = 0; i < n; i++) + { + show_debug_message( + string(i) + + ": x=" + string(path_get_point_x(p, i)) + + " y=" + string(path_get_point_y(p, i)) + + " speed=" + string(path_get_point_speed(p, i)) + ); + } + + // Sample positions along the path + var samples = [0, 0.25, 0.5, 0.75, 1.0]; + + for (var i = 0; i < array_length(samples); i++) + { + var pos = samples[i]; + + show_debug_message( + "t=" + string(pos) + + " -> x=" + string(path_get_x(p, pos)) + + " y=" + string(path_get_y(p, pos)) + + " speed=" + string(path_get_speed(p, pos)) + ); + } +} + +// Create path + +global.test_path = path_add(); +var p = global.test_path; + +show_debug_message("Created path id = " + string(p)); + +path_add_point(p, 64, 64, 100); +path_add_point(p, 256, 64, 200); +path_add_point(p, 256, 256, 300); +path_add_point(p, 64, 256, 400); + +dump_path(p); + +// Precision + +show_debug_message("===== CHANGE PRECISION ====="); + +path_set_precision(p, 8); +dump_path(p); + +// Kind + +show_debug_message("===== CHANGE KIND ====="); + +path_set_kind(p, 1); +dump_path(p); + +// Closed + +show_debug_message("===== MAKE CLOSED ====="); + +path_set_closed(p, true); +dump_path(p); + +// Clear + +show_debug_message("===== CLEAR POINTS ====="); + +path_clear_points(p); + +dump_path(p); + +// Rebuild path for movement test + +show_debug_message("===== REBUILD PATH ====="); + +path_add_point(p, 64, 64, 100); +path_add_point(p, 256, 64, 100); +path_add_point(p, 256, 256, 100); +path_add_point(p, 64, 256, 100); + +dump_path(p); + +// Create moving instance + +instance_create_layer(64, 64, "Instances", obj_mover); + +alarm[0] = room_speed * 3; + +show_debug_message("===== PATH TEST READY ====="); \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/objects/Object1/Object1.yy b/tests/automated-ci/paths/gm-project/objects/Object1/Object1.yy new file mode 100644 index 000000000..8cf4903af --- /dev/null +++ b/tests/automated-ci/paths/gm-project/objects/Object1/Object1.yy @@ -0,0 +1,36 @@ +{ + "$GMObject":"", + "%Name":"Object1", + "eventList":[ + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":2,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, + ], + "managed":true, + "name":"Object1", + "overriddenProperties":[], + "parent":{ + "name":"Path Test", + "path":"Path Test.yyp", + }, + "parentObjectId":null, + "persistent":false, + "physicsAngularDamping":0.1, + "physicsDensity":0.5, + "physicsFriction":0.2, + "physicsGroup":1, + "physicsKinematic":false, + "physicsLinearDamping":0.1, + "physicsObject":false, + "physicsRestitution":0.1, + "physicsSensor":false, + "physicsShape":1, + "physicsShapePoints":[], + "physicsStartAwake":true, + "properties":[], + "resourceType":"GMObject", + "resourceVersion":"2.0", + "solid":false, + "spriteId":null, + "spriteMaskId":null, + "visible":true, +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/objects/obj_mover/Create_0.gml b/tests/automated-ci/paths/gm-project/objects/obj_mover/Create_0.gml new file mode 100644 index 000000000..f6e5c53da --- /dev/null +++ b/tests/automated-ci/paths/gm-project/objects/obj_mover/Create_0.gml @@ -0,0 +1 @@ +path_start(global.test_path, 4, path_action_stop, false); \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/objects/obj_mover/Step_0.gml b/tests/automated-ci/paths/gm-project/objects/obj_mover/Step_0.gml new file mode 100644 index 000000000..6128c1e11 --- /dev/null +++ b/tests/automated-ci/paths/gm-project/objects/obj_mover/Step_0.gml @@ -0,0 +1,6 @@ +show_debug_message( + "MOVE " + + "x=" + string(x) + + " y=" + string(y) + + " path_position=" + string(path_position) +); \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/objects/obj_mover/obj_mover.yy b/tests/automated-ci/paths/gm-project/objects/obj_mover/obj_mover.yy new file mode 100644 index 000000000..f48d525ab --- /dev/null +++ b/tests/automated-ci/paths/gm-project/objects/obj_mover/obj_mover.yy @@ -0,0 +1,36 @@ +{ + "$GMObject":"", + "%Name":"obj_mover", + "eventList":[ + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, + ], + "managed":true, + "name":"obj_mover", + "overriddenProperties":[], + "parent":{ + "name":"Path Test", + "path":"Path Test.yyp", + }, + "parentObjectId":null, + "persistent":false, + "physicsAngularDamping":0.1, + "physicsDensity":0.5, + "physicsFriction":0.2, + "physicsGroup":1, + "physicsKinematic":false, + "physicsLinearDamping":0.1, + "physicsObject":false, + "physicsRestitution":0.1, + "physicsSensor":false, + "physicsShape":1, + "physicsShapePoints":[], + "physicsStartAwake":true, + "properties":[], + "resourceType":"GMObject", + "resourceVersion":"2.0", + "solid":false, + "spriteId":null, + "spriteMaskId":null, + "visible":true, +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/options/android/options_android.yy b/tests/automated-ci/paths/gm-project/options/android/options_android.yy new file mode 100644 index 000000000..f972673ce --- /dev/null +++ b/tests/automated-ci/paths/gm-project/options/android/options_android.yy @@ -0,0 +1,85 @@ +{ + "$GMAndroidOptions":"v1", + "%Name":"Android", + "name":"Android", + "option_android_application_tag_inject":"", + "option_android_arch_arm64":true, + "option_android_arch_armv7":false, + "option_android_arch_x86_64":false, + "option_android_attribute_allow_backup":false, + "option_android_build_tools":"", + "option_android_compile_sdk":"", + "option_android_device_support":0, + "option_android_display_layout":"LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT", + "option_android_display_name":"Path Test", + "option_android_edge_to_edge_display":false, + "option_android_facebook_app_display_name":"", + "option_android_facebook_id":"", + "option_android_gamepad_support":true, + "option_android_google_apk_expansion":false, + "option_android_google_cloud_saving":false, + "option_android_google_dynamic_asset_delivery":false, + "option_android_google_licensing_public_key":"", + "option_android_google_services_app_id":"", + "option_android_gradle_plugin_version":"8.8.0", + "option_android_gradle_version":"8.10.2", + "option_android_icon_adaptivebg_hdpi":"${base_options_dir}/android/icons_adaptivebg/hdpi.png", + "option_android_icon_adaptivebg_ldpi":"${base_options_dir}/android/icons_adaptivebg/ldpi.png", + "option_android_icon_adaptivebg_mdpi":"${base_options_dir}/android/icons_adaptivebg/mdpi.png", + "option_android_icon_adaptivebg_xhdpi":"${base_options_dir}/android/icons_adaptivebg/xhdpi.png", + "option_android_icon_adaptivebg_xxhdpi":"${base_options_dir}/android/icons_adaptivebg/xxhdpi.png", + "option_android_icon_adaptivebg_xxxhdpi":"${base_options_dir}/android/icons_adaptivebg/xxxhdpi.png", + "option_android_icon_adaptive_generate":false, + "option_android_icon_adaptive_hdpi":"${base_options_dir}/android/icons_adaptive/hdpi.png", + "option_android_icon_adaptive_ldpi":"${base_options_dir}/android/icons_adaptive/ldpi.png", + "option_android_icon_adaptive_mdpi":"${base_options_dir}/android/icons_adaptive/mdpi.png", + "option_android_icon_adaptive_xhdpi":"${base_options_dir}/android/icons_adaptive/xhdpi.png", + "option_android_icon_adaptive_xxhdpi":"${base_options_dir}/android/icons_adaptive/xxhdpi.png", + "option_android_icon_adaptive_xxxhdpi":"${base_options_dir}/android/icons_adaptive/xxxhdpi.png", + "option_android_icon_hdpi":"${base_options_dir}/android/icons/hdpi.png", + "option_android_icon_ldpi":"${base_options_dir}/android/icons/ldpi.png", + "option_android_icon_mdpi":"${base_options_dir}/android/icons/mdpi.png", + "option_android_icon_xhdpi":"${base_options_dir}/android/icons/xhdpi.png", + "option_android_icon_xxhdpi":"${base_options_dir}/android/icons/xxhdpi.png", + "option_android_icon_xxxhdpi":"${base_options_dir}/android/icons/xxxhdpi.png", + "option_android_install_location":0, + "option_android_interpolate_pixels":true, + "option_android_launchscreen_fill":0, + "option_android_lint":false, + "option_android_logcat":"yoyo:V DEBUG:V AndroidRuntime:V", + "option_android_minimum_sdk":"", + "option_android_orient_landscape":true, + "option_android_orient_landscape_flipped":true, + "option_android_orient_portrait":true, + "option_android_orient_portrait_flipped":true, + "option_android_package_company":"company", + "option_android_package_domain":"com", + "option_android_package_product":"game", + "option_android_permission_bluetooth":true, + "option_android_permission_internet":true, + "option_android_permission_network_state":false, + "option_android_permission_read_phone_state":false, + "option_android_permission_record_audio":false, + "option_android_permission_write_external_storage":false, + "option_android_proguard_minifying":false, + "option_android_proguard_shrinking":false, + "option_android_scale":0, + "option_android_screen_depth":0, + "option_android_sleep_margin":4, + "option_android_splashscreen_background_colour":255, + "option_android_splash_screens_landscape":"${base_options_dir}/android/splash/landscape.png", + "option_android_splash_screens_portrait":"${base_options_dir}/android/splash/portrait.png", + "option_android_splash_time":0, + "option_android_support_lib":"", + "option_android_sync_amazon":false, + "option_android_target_sdk":"", + "option_android_texture_page":"2048x2048", + "option_android_tools_from_version":false, + "option_android_tv_banner":"${base_options_dir}/android/tv_banner.png", + "option_android_tv_isgame":true, + "option_android_tv_supports_leanback":true, + "option_android_use_facebook":false, + "option_android_version":"1.0.0.0", + "resourceType":"GMAndroidOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/options/html5/options_html5.yy b/tests/automated-ci/paths/gm-project/options/html5/options_html5.yy new file mode 100644 index 000000000..471a4134d --- /dev/null +++ b/tests/automated-ci/paths/gm-project/options/html5/options_html5.yy @@ -0,0 +1,35 @@ +{ + "$GMHtml5Options":"", + "%Name":"HTML5", + "name":"HTML5", + "option_html5_allow_fullscreen":true, + "option_html5_browser_title":"Path Test", + "option_html5_centregame":false, + "option_html5_display_cursor":true, + "option_html5_facebook_app_display_name":"", + "option_html5_facebook_id":"", + "option_html5_flurry_enable":false, + "option_html5_flurry_id":"", + "option_html5_foldername":"html5game", + "option_html5_google_analytics_enable":false, + "option_html5_google_tracking_id":"", + "option_html5_icon":"${base_options_dir}/html5/fav.ico", + "option_html5_index":"", + "option_html5_interpolate_pixels":true, + "option_html5_jsprepend":"", + "option_html5_loadingbar":"", + "option_html5_localrunalert":true, + "option_html5_outputdebugtoconsole":true, + "option_html5_outputname":"index.html", + "option_html5_scale":0, + "option_html5_splash_png":"${base_options_dir}/html5/splash.png", + "option_html5_texture_page":"2048x2048", + "option_html5_usebuiltinfont":true, + "option_html5_usebuiltinparticles":true, + "option_html5_usesplash":false, + "option_html5_use_facebook":false, + "option_html5_version":"1.0.0.0", + "option_html5_webgl":2, + "resourceType":"GMHtml5Options", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/options/ios/options_ios.yy b/tests/automated-ci/paths/gm-project/options/ios/options_ios.yy new file mode 100644 index 000000000..313e77788 --- /dev/null +++ b/tests/automated-ci/paths/gm-project/options/ios/options_ios.yy @@ -0,0 +1,49 @@ +{ + "$GMiOSOptions":"v1", + "%Name":"iOS", + "name":"iOS", + "option_ios_build_number":0, + "option_ios_bundle_name":"com.company.game", + "option_ios_defer_home_indicator":false, + "option_ios_devices":2, + "option_ios_display_name":"Path Test", + "option_ios_enable_broadcast":false, + "option_ios_half_ipad1_textures":false, + "option_ios_icon_ipad_app_152":"${base_options_dir}/ios/icons/app/ipad_152.png", + "option_ios_icon_ipad_app_76":"${base_options_dir}/ios/icons/app/ipad_76.png", + "option_ios_icon_ipad_notification_20":"${base_options_dir}/ios/icons/notification/ipad_20.png", + "option_ios_icon_ipad_notification_40":"${base_options_dir}/ios/icons/notification/ipad_40.png", + "option_ios_icon_ipad_pro_app_167":"${base_options_dir}/ios/icons/app/ipad_pro_167.png", + "option_ios_icon_ipad_settings_29":"${base_options_dir}/ios/icons/settings/ipad_29.png", + "option_ios_icon_ipad_settings_58":"${base_options_dir}/ios/icons/settings/ipad_58.png", + "option_ios_icon_ipad_spotlight_40":"${base_options_dir}/ios/icons/spotlight/ipad_40.png", + "option_ios_icon_ipad_spotlight_80":"${base_options_dir}/ios/icons/spotlight/ipad_80.png", + "option_ios_icon_iphone_app_120":"${base_options_dir}/ios/icons/app/iphone_120.png", + "option_ios_icon_iphone_app_180":"${base_options_dir}/ios/icons/app/iphone_180.png", + "option_ios_icon_iphone_notification_40":"${base_options_dir}/ios/icons/notification/iphone_40.png", + "option_ios_icon_iphone_notification_60":"${base_options_dir}/ios/icons/notification/iphone_60.png", + "option_ios_icon_iphone_settings_58":"${base_options_dir}/ios/icons/settings/iphone_58.png", + "option_ios_icon_iphone_settings_87":"${base_options_dir}/ios/icons/settings/iphone_87.png", + "option_ios_icon_iphone_spotlight_120":"${base_options_dir}/ios/icons/spotlight/iphone_120.png", + "option_ios_icon_iphone_spotlight_80":"${base_options_dir}/ios/icons/spotlight/iphone_80.png", + "option_ios_icon_itunes_artwork_1024":"${base_options_dir}/ios/icons/itunes/itunes_1024.png", + "option_ios_interpolate_pixels":true, + "option_ios_launchscreen_fill":0, + "option_ios_launchscreen_image":"${base_options_dir}/ios/splash/launchscreen.png", + "option_ios_launchscreen_image_landscape":"${base_options_dir}/ios/splash/launchscreen-landscape.png", + "option_ios_min_version":"10.0", + "option_ios_orientation_landscape":true, + "option_ios_orientation_landscape_flipped":true, + "option_ios_orientation_portrait":true, + "option_ios_orientation_portrait_flipped":true, + "option_ios_output_dir":"~/gamemakerstudio2", + "option_ios_podfile_lock_path":"${options_dir}/ios/Podfile.lock", + "option_ios_podfile_path":"${options_dir}/ios/Podfile", + "option_ios_scale":0, + "option_ios_splashscreen_background_colour":255, + "option_ios_team_id":"", + "option_ios_texture_page":"2048x2048", + "option_ios_version":"1.0.0.0", + "resourceType":"GMiOSOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/options/linux/options_linux.yy b/tests/automated-ci/paths/gm-project/options/linux/options_linux.yy new file mode 100644 index 000000000..842298977 --- /dev/null +++ b/tests/automated-ci/paths/gm-project/options/linux/options_linux.yy @@ -0,0 +1,26 @@ +{ + "$GMLinuxOptions":"", + "%Name":"Linux", + "name":"Linux", + "option_linux_allow_fullscreen":false, + "option_linux_disable_sandbox":false, + "option_linux_display_cursor":true, + "option_linux_display_name":"Path Test", + "option_linux_display_splash":false, + "option_linux_enable_steam":false, + "option_linux_homepage":"http://www.yoyogames.com", + "option_linux_icon":"${base_options_dir}/linux/icons/64.png", + "option_linux_interpolate_pixels":true, + "option_linux_long_desc":"", + "option_linux_maintainer_email":"", + "option_linux_resize_window":false, + "option_linux_scale":0, + "option_linux_short_desc":"", + "option_linux_splash_screen":"${base_options_dir}/linux/splash/splash.png", + "option_linux_start_fullscreen":false, + "option_linux_sync":true, + "option_linux_texture_page":"2048x2048", + "option_linux_version":"1.0.0.0", + "resourceType":"GMLinuxOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/options/mac/options_mac.yy b/tests/automated-ci/paths/gm-project/options/mac/options_mac.yy new file mode 100644 index 000000000..bdf731812 --- /dev/null +++ b/tests/automated-ci/paths/gm-project/options/mac/options_mac.yy @@ -0,0 +1,38 @@ +{ + "$GMMacOptions":"", + "%Name":"macOS", + "name":"macOS", + "option_mac_allow_fullscreen":false, + "option_mac_allow_incoming_network":false, + "option_mac_allow_outgoing_network":false, + "option_mac_apple_sign_in":false, + "option_mac_app_category":"Games", + "option_mac_app_id":"com.company.game", + "option_mac_arm64":true, + "option_mac_build_app_store":false, + "option_mac_build_number":0, + "option_mac_copyright":"", + "option_mac_disable_sandbox":false, + "option_mac_display_cursor":true, + "option_mac_display_name":"Path Test", + "option_mac_enable_retina":false, + "option_mac_enable_steam":false, + "option_mac_icon_png":"${base_options_dir}/mac/icons/1024.png", + "option_mac_installer_background_png":"${base_options_dir}/mac/splash/installer_background.png", + "option_mac_interpolate_pixels":true, + "option_mac_menu_dock":false, + "option_mac_min_version":"10.10", + "option_mac_output_dir":"~/gamemakerstudio2", + "option_mac_resize_window":false, + "option_mac_scale":0, + "option_mac_signing_identity":"Developer ID Application:", + "option_mac_splash_png":"${base_options_dir}/mac/splash/splash.png", + "option_mac_start_fullscreen":false, + "option_mac_team_id":"", + "option_mac_texture_page":"2048x2048", + "option_mac_version":"1.0.0.0", + "option_mac_vsync":true, + "option_mac_x86_64":true, + "resourceType":"GMMacOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/options/main/options_main.yy b/tests/automated-ci/paths/gm-project/options/main/options_main.yy new file mode 100644 index 000000000..7a4a791d0 --- /dev/null +++ b/tests/automated-ci/paths/gm-project/options/main/options_main.yy @@ -0,0 +1,29 @@ +{ + "$GMMainOptions":"v5", + "%Name":"Main", + "name":"Main", + "option_allow_instance_change":false, + "option_audio_error_behaviour":false, + "option_author":"", + "option_collision_compatibility":false, + "option_copy_on_write_enabled":false, + "option_draw_colour":4294967295, + "option_gameguid":"c79879d4-2d35-4c70-98f5-87caed597927", + "option_gameid":"0", + "option_game_speed":60, + "option_legacy_json_parsing":false, + "option_legacy_number_conversion":false, + "option_legacy_other_behaviour":false, + "option_legacy_primitive_drawing":false, + "option_mips_for_3d_textures":false, + "option_remove_unused_assets":true, + "option_sci_usesci":false, + "option_spine_licence":false, + "option_steam_app_id":"0", + "option_template_description":null, + "option_template_icon":"${base_options_dir}/main/template_icon.png", + "option_template_image":"${base_options_dir}/main/template_image.png", + "option_window_colour":255, + "resourceType":"GMMainOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/options/operagx/options_operagx.yy b/tests/automated-ci/paths/gm-project/options/operagx/options_operagx.yy new file mode 100644 index 000000000..7d5cac677 --- /dev/null +++ b/tests/automated-ci/paths/gm-project/options/operagx/options_operagx.yy @@ -0,0 +1,30 @@ +{ + "$GMOperaGXOptions":"v1", + "%Name":"Opera GX", + "name":"Opera GX", + "option_operagx_display_cursor":true, + "option_operagx_editUrl":"", + "option_operagx_game_name":"new_blank", + "option_operagx_guid":"", + "option_operagx_internalShareUrl":"", + "option_operagx_interpolate_pixels":true, + "option_operagx_mod_editUrl":"", + "option_operagx_mod_game_name":"new_blank", + "option_operagx_mod_guid":"", + "option_operagx_mod_internalShareUrl":"", + "option_operagx_mod_next_version":"1.0.0.0", + "option_operagx_mod_publicShareUrl":"", + "option_operagx_mod_team_id":"", + "option_operagx_mod_team_name":"", + "option_operagx_mod_version":"1.0.0.0", + "option_operagx_next_version":"1.0.0.0", + "option_operagx_publicShareUrl":"", + "option_operagx_scale":0, + "option_operagx_team_id":"", + "option_operagx_team_name":"", + "option_operagx_texture_page":"2048x2048", + "option_operagx_transparent_background":false, + "option_operagx_version":"1.0.0.0", + "resourceType":"GMOperaGXOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/options/reddit/options_reddit.yy b/tests/automated-ci/paths/gm-project/options/reddit/options_reddit.yy new file mode 100644 index 000000000..231c577b8 --- /dev/null +++ b/tests/automated-ci/paths/gm-project/options/reddit/options_reddit.yy @@ -0,0 +1,15 @@ +{ + "$GMRedditOptions":"v2", + "%Name":"Reddit", + "name":"Reddit", + "option_reddit_devvit_project_id":"new_blank", + "option_reddit_devvit_project_path":"", + "option_reddit_display_cursor":true, + "option_reddit_game_name":"new_blank", + "option_reddit_interpolate_pixels":true, + "option_reddit_scale":0, + "option_reddit_texture_page":"2048x2048", + "option_reddit_transparent_background":false, + "resourceType":"GMRedditOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/options/tvos/options_tvos.yy b/tests/automated-ci/paths/gm-project/options/tvos/options_tvos.yy new file mode 100644 index 000000000..2a94bd8ea --- /dev/null +++ b/tests/automated-ci/paths/gm-project/options/tvos/options_tvos.yy @@ -0,0 +1,31 @@ +{ + "$GMtvOSOptions":"v1", + "%Name":"tvOS", + "name":"tvOS", + "option_tvos_build_number":0, + "option_tvos_bundle_name":"com.company.game", + "option_tvos_display_cursor":false, + "option_tvos_display_name":"Path Test", + "option_tvos_enable_broadcast":false, + "option_tvos_icon_1280":"${base_options_dir}/tvos/icons/1280.png", + "option_tvos_icon_400":"${base_options_dir}/tvos/icons/400.png", + "option_tvos_icon_400_2x":"${base_options_dir}/tvos/icons/400_2x.png", + "option_tvos_interpolate_pixels":true, + "option_tvos_min_version":"10.0", + "option_tvos_output_dir":"~/GameMakerStudio2/tvOS", + "option_tvos_podfile_lock_path":"${options_dir}\\tvos\\Podfile.lock", + "option_tvos_podfile_path":"${options_dir}\\tvos\\Podfile", + "option_tvos_scale":0, + "option_tvos_splashscreen":"${base_options_dir}/tvos/splash/splash.png", + "option_tvos_splashscreen_2x":"${base_options_dir}/tvos/splash/splash_2x.png", + "option_tvos_splash_time":0, + "option_tvos_team_id":"", + "option_tvos_texture_page":"2048x2048", + "option_tvos_topshelf":"${base_options_dir}/tvos/topshelf/topshelf.png", + "option_tvos_topshelf_2x":"${base_options_dir}/tvos/topshelf/topshelf_2x.png", + "option_tvos_topshelf_wide":"${base_options_dir}/tvos/topshelf/topshelf_wide.png", + "option_tvos_topshelf_wide_2x":"${base_options_dir}/tvos/topshelf/topshelf_wide_2x.png", + "option_tvos_version":"1.0.0.0", + "resourceType":"GMtvOSOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/options/windows/options_windows.yy b/tests/automated-ci/paths/gm-project/options/windows/options_windows.yy new file mode 100644 index 000000000..5fd85fac3 --- /dev/null +++ b/tests/automated-ci/paths/gm-project/options/windows/options_windows.yy @@ -0,0 +1,38 @@ +{ + "$GMWindowsOptions":"v2", + "%Name":"Windows", + "name":"Windows", + "option_windows_allow_fullscreen_switching":false, + "option_windows_borderless":false, + "option_windows_company_info":"YoYo Games Ltd", + "option_windows_copyright_info":"", + "option_windows_copy_exe_to_dest":false, + "option_windows_d3dswapeffectdiscard":false, + "option_windows_description_info":"A GameMaker Game", + "option_windows_disable_sandbox":false, + "option_windows_display_cursor":true, + "option_windows_display_name":"Path Test", + "option_windows_enable_steam":false, + "option_windows_executable_name":"new_blank.exe", + "option_windows_icon":"${base_options_dir}/windows/icons/icon.ico", + "option_windows_installer_finished":"${base_options_dir}/windows/installer/finished.bmp", + "option_windows_installer_header":"${base_options_dir}/windows/installer/header.bmp", + "option_windows_interpolate_pixels":true, + "option_windows_license":"${base_options_dir}/windows/installer/license.txt", + "option_windows_nsis_file":"${base_options_dir}/windows/installer/nsis_script.nsi", + "option_windows_product_info":"new_blank", + "option_windows_resize_window":false, + "option_windows_save_location":0, + "option_windows_scale":0, + "option_windows_sleep_margin":10, + "option_windows_splash_screen":"${base_options_dir}/windows/splash/splash.png", + "option_windows_start_fullscreen":false, + "option_windows_steam_use_alternative_launcher":false, + "option_windows_texture_page":"2048x2048", + "option_windows_use_raw_mouse":false, + "option_windows_use_splash":false, + "option_windows_version":"1.0.0.0", + "option_windows_vsync":true, + "resourceType":"GMWindowsOptions", + "resourceVersion":"2.0", +} \ No newline at end of file diff --git a/tests/automated-ci/paths/gm-project/rooms/Room1/Room1.yy b/tests/automated-ci/paths/gm-project/rooms/Room1/Room1.yy new file mode 100644 index 000000000..4c8ef48c8 --- /dev/null +++ b/tests/automated-ci/paths/gm-project/rooms/Room1/Room1.yy @@ -0,0 +1,57 @@ +{ + "$GMRoom":"v1", + "%Name":"Room1", + "creationCodeFile":"", + "inheritCode":false, + "inheritCreationOrder":false, + "inheritLayers":false, + "instanceCreationOrder":[ + {"name":"inst_7696DB54","path":"rooms/Room1/Room1.yy",}, + ], + "isDnd":false, + "layers":[ + {"$GMRInstanceLayer":"","%Name":"Instances","depth":0,"effectEnabled":true,"effectType":null,"gridX":32,"gridY":32,"hierarchyFrozen":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"inheritSubLayers":true,"inheritVisibility":true,"instances":[ + {"$GMRInstance":"v4","%Name":"inst_7696DB54","colour":4294967295,"frozen":false,"hasCreationCode":false,"ignore":false,"imageIndex":0,"imageSpeed":1.0,"inheritCode":false,"inheritedItemId":null,"inheritItemSettings":false,"isDnd":false,"name":"inst_7696DB54","objectId":{"name":"Object1","path":"objects/Object1/Object1.yy",},"properties":[],"resourceType":"GMRInstance","resourceVersion":"2.0","rotation":0.0,"scaleX":1.0,"scaleY":1.0,"x":704.0,"y":320.0,}, + ],"layers":[],"name":"Instances","properties":[],"resourceType":"GMRInstanceLayer","resourceVersion":"2.0","userdefinedDepth":false,"visible":true,}, + {"$GMRBackgroundLayer":"","%Name":"Background","animationFPS":15.0,"animationSpeedType":0,"colour":4278190080,"depth":100,"effectEnabled":true,"effectType":null,"gridX":32,"gridY":32,"hierarchyFrozen":false,"hspeed":0.0,"htiled":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"inheritSubLayers":true,"inheritVisibility":true,"layers":[],"name":"Background","properties":[],"resourceType":"GMRBackgroundLayer","resourceVersion":"2.0","spriteId":null,"stretch":false,"userdefinedAnimFPS":false,"userdefinedDepth":false,"visible":true,"vspeed":0.0,"vtiled":false,"x":0,"y":0,}, + ], + "name":"Room1", + "parent":{ + "name":"Path Test", + "path":"Path Test.yyp", + }, + "parentRoom":null, + "physicsSettings":{ + "inheritPhysicsSettings":false, + "PhysicsWorld":false, + "PhysicsWorldGravityX":0.0, + "PhysicsWorldGravityY":10.0, + "PhysicsWorldPixToMetres":0.1, + }, + "resourceType":"GMRoom", + "resourceVersion":"2.0", + "roomSettings":{ + "Height":768, + "inheritRoomSettings":false, + "persistent":false, + "Width":1366, + }, + "sequenceId":null, + "views":[ + {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, + {"hborder":32,"hport":768,"hspeed":-1,"hview":768,"inherit":false,"objectId":null,"vborder":32,"visible":false,"vspeed":-1,"wport":1366,"wview":1366,"xport":0,"xview":0,"yport":0,"yview":0,}, + ], + "viewSettings":{ + "clearDisplayBuffer":true, + "clearViewBackground":false, + "enableViews":false, + "inheritViewSettings":false, + }, + "volume":1.0, +} \ No newline at end of file diff --git a/tests/automated-ci/paths/path_test.ios b/tests/automated-ci/paths/path_test.ios new file mode 100644 index 000000000..3bd3a44c9 Binary files /dev/null and b/tests/automated-ci/paths/path_test.ios differ diff --git a/tests/automated-ci/paths/path_test_expected_output.txt b/tests/automated-ci/paths/path_test_expected_output.txt new file mode 100644 index 000000000..b38af258a --- /dev/null +++ b/tests/automated-ci/paths/path_test_expected_output.txt @@ -0,0 +1,284 @@ +===== PATH TEST BEGIN ===== +Created path ref path __newpath0 +------------------------- +exists = 1 +length = 768 +points = 4 +closed = 1 +kind = 0 +precision = 4 +0: x=64 y=64 speed=100 +1: x=256 y=64 speed=200 +2: x=256 y=256 speed=300 +3: x=64 y=256 speed=400 +t=0 -> x=64 y=64 speed=100 +t=0.25 -> x=256 y=64 speed=200 +t=0.50 -> x=256 y=256 speed=300 +t=0.75 -> x=64 y=256 speed=400 +t=1 -> x=64 y=64 speed=100 +===== CHANGE PRECISION ===== +------------------------- +exists = 1 +length = 768 +points = 4 +closed = 1 +kind = 0 +precision = 8 +0: x=64 y=64 speed=100 +1: x=256 y=64 speed=200 +2: x=256 y=256 speed=300 +3: x=64 y=256 speed=400 +t=0 -> x=64 y=64 speed=100 +t=0.25 -> x=256 y=64 speed=200 +t=0.50 -> x=256 y=256 speed=300 +t=0.75 -> x=64 y=256 speed=400 +t=1 -> x=64 y=64 speed=100 +===== CHANGE KIND ===== +------------------------- +exists = 1 +length = 623.30 +points = 4 +closed = 1 +kind = 1 +precision = 8 +0: x=64 y=64 speed=100 +1: x=256 y=64 speed=200 +2: x=256 y=256 speed=300 +3: x=64 y=256 speed=400 +t=0 -> x=162.98 y=64.02 speed=151.56 +t=0.25 -> x=255.98 y=162.98 speed=251.56 +t=0.50 -> x=157.02 y=255.98 speed=351.51 +t=0.75 -> x=64.02 y=157.02 speed=245.36 +t=1 -> x=162.98 y=64.02 speed=151.56 +===== MAKE CLOSED ===== +------------------------- +exists = 1 +length = 623.30 +points = 4 +closed = 1 +kind = 1 +precision = 8 +0: x=64 y=64 speed=100 +1: x=256 y=64 speed=200 +2: x=256 y=256 speed=300 +3: x=64 y=256 speed=400 +t=0 -> x=162.98 y=64.02 speed=151.56 +t=0.25 -> x=255.98 y=162.98 speed=251.56 +t=0.50 -> x=157.02 y=255.98 speed=351.51 +t=0.75 -> x=64.02 y=157.02 speed=245.36 +t=1 -> x=162.98 y=64.02 speed=151.56 +===== CLEAR POINTS ===== +------------------------- +exists = 1 +length = 0 +points = 0 +closed = 1 +kind = 1 +precision = 8 +t=0 -> x=0 y=0 speed=100 +t=0.25 -> x=0 y=0 speed=100 +t=0.50 -> x=0 y=0 speed=100 +t=0.75 -> x=0 y=0 speed=100 +t=1 -> x=0 y=0 speed=100 +===== REBUILD PATH ===== +------------------------- +exists = 1 +length = 623.30 +points = 4 +closed = 1 +kind = 1 +precision = 8 +0: x=64 y=64 speed=100 +1: x=256 y=64 speed=100 +2: x=256 y=256 speed=100 +3: x=64 y=256 speed=100 +t=0 -> x=162.98 y=64.02 speed=100 +t=0.25 -> x=255.98 y=162.98 speed=100 +t=0.50 -> x=157.02 y=255.98 speed=100 +t=0.75 -> x=64.02 y=157.02 speed=100 +t=1 -> x=162.98 y=64.02 speed=100 +===== PATH TEST READY ===== +MOVE x=64 y=64 path_position=0 +MOVE x=68.00 y=64.11 path_position=0.01 +MOVE x=71.99 y=64.31 path_position=0.01 +MOVE x=75.98 y=64.61 path_position=0.02 +MOVE x=79.96 y=65.02 path_position=0.03 +MOVE x=83.93 y=65.54 path_position=0.03 +MOVE x=87.87 y=66.18 path_position=0.04 +MOVE x=91.80 y=66.95 path_position=0.04 +MOVE x=95.70 y=67.85 path_position=0.05 +MOVE x=99.56 y=68.90 path_position=0.06 +MOVE x=103.37 y=70.10 path_position=0.06 +MOVE x=107.13 y=71.46 path_position=0.07 +MOVE x=110.83 y=72.99 path_position=0.08 +MOVE x=114.45 y=74.70 path_position=0.08 +MOVE x=117.97 y=76.58 path_position=0.09 +MOVE x=121.40 y=78.64 path_position=0.10 +MOVE x=124.70 y=80.90 path_position=0.10 +MOVE x=127.87 y=83.33 path_position=0.11 +MOVE x=130.90 y=85.95 path_position=0.12 +MOVE x=133.76 y=88.74 path_position=0.12 +MOVE x=136.46 y=91.69 path_position=0.13 +MOVE x=138.98 y=94.80 path_position=0.13 +MOVE x=141.32 y=98.04 path_position=0.14 +MOVE x=143.48 y=101.41 path_position=0.15 +MOVE x=145.45 y=104.89 path_position=0.15 +MOVE x=147.23 y=108.47 path_position=0.16 +MOVE x=148.84 y=112.13 path_position=0.17 +MOVE x=150.29 y=115.86 path_position=0.17 +MOVE x=151.56 y=119.65 path_position=0.18 +MOVE x=152.68 y=123.49 path_position=0.19 +MOVE x=153.65 y=127.37 path_position=0.19 +MOVE x=154.48 y=131.28 path_position=0.20 +MOVE x=155.18 y=135.22 path_position=0.21 +MOVE x=155.75 y=139.18 path_position=0.21 +MOVE x=156.21 y=143.15 path_position=0.22 +MOVE x=156.56 y=147.14 path_position=0.22 +MOVE x=156.81 y=151.13 path_position=0.23 +MOVE x=156.96 y=155.13 path_position=0.24 +MOVE x=157 y=159.13 path_position=0.24 +MOVE x=157.00 y=163.13 path_position=0.25 +MOVE x=156.88 y=167.13 path_position=0.26 +MOVE x=156.68 y=171.12 path_position=0.26 +MOVE x=156.37 y=175.11 path_position=0.27 +MOVE x=155.96 y=179.09 path_position=0.28 +MOVE x=155.44 y=183.05 path_position=0.28 +MOVE x=154.79 y=187.00 path_position=0.29 +MOVE x=154.02 y=190.92 path_position=0.30 +MOVE x=153.11 y=194.82 path_position=0.30 +MOVE x=152.05 y=198.68 path_position=0.31 +MOVE x=150.85 y=202.49 path_position=0.31 +MOVE x=149.48 y=206.25 path_position=0.32 +MOVE x=147.94 y=209.94 path_position=0.33 +MOVE x=146.23 y=213.55 path_position=0.33 +MOVE x=144.33 y=217.08 path_position=0.34 +MOVE x=142.26 y=220.50 path_position=0.35 +MOVE x=140.00 y=223.80 path_position=0.35 +MOVE x=137.56 y=226.96 path_position=0.36 +MOVE x=134.93 y=229.98 path_position=0.37 +MOVE x=132.13 y=232.84 path_position=0.37 +MOVE x=129.18 y=235.53 path_position=0.38 +MOVE x=126.06 y=238.04 path_position=0.39 +MOVE x=122.82 y=240.37 path_position=0.39 +MOVE x=119.44 y=242.52 path_position=0.40 +MOVE x=115.96 y=244.48 path_position=0.40 +MOVE x=112.37 y=246.26 path_position=0.41 +MOVE x=108.71 y=247.86 path_position=0.42 +MOVE x=104.98 y=249.30 path_position=0.42 +MOVE x=101.18 y=250.56 path_position=0.43 +MOVE x=97.34 y=251.67 path_position=0.44 +MOVE x=93.46 y=252.64 path_position=0.44 +MOVE x=89.54 y=253.46 path_position=0.45 +MOVE x=85.61 y=254.16 path_position=0.46 +MOVE x=81.65 y=254.73 path_position=0.46 +MOVE x=77.67 y=255.18 path_position=0.47 +MOVE x=73.69 y=255.52 path_position=0.47 +MOVE x=69.70 y=255.77 path_position=0.48 +MOVE x=65.70 y=255.91 path_position=0.49 +MOVE x=61.70 y=255.95 path_position=0.49 +MOVE x=57.70 y=255.94 path_position=0.50 +MOVE x=53.70 y=255.83 path_position=0.51 +MOVE x=49.71 y=255.62 path_position=0.51 +MOVE x=45.72 y=255.31 path_position=0.52 +MOVE x=41.74 y=254.89 path_position=0.53 +MOVE x=37.78 y=254.36 path_position=0.53 +MOVE x=33.83 y=253.71 path_position=0.54 +MOVE x=29.91 y=252.93 path_position=0.55 +MOVE x=26.01 y=252.02 path_position=0.55 +MOVE x=22.16 y=250.95 path_position=0.56 +MOVE x=18.35 y=249.74 path_position=0.56 +MOVE x=14.59 y=248.37 path_position=0.57 +MOVE x=10.90 y=246.82 path_position=0.58 +MOVE x=7.29 y=245.10 path_position=0.58 +MOVE x=3.77 y=243.20 path_position=0.59 +MOVE x=0.36 y=241.12 path_position=0.60 +MOVE x=-2.94 y=238.85 path_position=0.60 +MOVE x=-6.10 y=236.40 path_position=0.61 +MOVE x=-9.11 y=233.77 path_position=0.62 +MOVE x=-11.96 y=230.96 path_position=0.62 +MOVE x=-14.64 y=228.00 path_position=0.63 +MOVE x=-17.15 y=224.88 path_position=0.64 +MOVE x=-19.47 y=221.62 path_position=0.64 +MOVE x=-21.61 y=218.25 path_position=0.65 +MOVE x=-23.57 y=214.76 path_position=0.65 +MOVE x=-25.33 y=211.17 path_position=0.66 +MOVE x=-26.93 y=207.50 path_position=0.67 +MOVE x=-28.36 y=203.76 path_position=0.67 +MOVE x=-29.62 y=199.97 path_position=0.68 +MOVE x=-30.72 y=196.12 path_position=0.69 +MOVE x=-31.68 y=192.24 path_position=0.69 +MOVE x=-32.50 y=188.33 path_position=0.70 +MOVE x=-33.18 y=184.39 path_position=0.71 +MOVE x=-33.75 y=180.43 path_position=0.71 +MOVE x=-34.20 y=176.45 path_position=0.72 +MOVE x=-34.54 y=172.47 path_position=0.73 +MOVE x=-34.78 y=168.47 path_position=0.73 +MOVE x=-34.92 y=164.48 path_position=0.74 +MOVE x=-34.95 y=160.48 path_position=0.74 +MOVE x=-34.94 y=156.48 path_position=0.75 +MOVE x=-34.82 y=152.48 path_position=0.76 +MOVE x=-34.61 y=148.48 path_position=0.76 +MOVE x=-34.29 y=144.50 path_position=0.77 +MOVE x=-33.87 y=140.52 path_position=0.78 +MOVE x=-33.34 y=136.56 path_position=0.78 +MOVE x=-32.68 y=132.61 path_position=0.79 +MOVE x=-31.89 y=128.69 path_position=0.80 +MOVE x=-30.98 y=124.79 path_position=0.80 +MOVE x=-29.91 y=120.94 path_position=0.81 +MOVE x=-28.68 y=117.13 path_position=0.82 +MOVE x=-27.30 y=113.38 path_position=0.82 +MOVE x=-25.75 y=109.69 path_position=0.83 +MOVE x=-24.02 y=106.09 path_position=0.83 +MOVE x=-22.11 y=102.57 path_position=0.84 +MOVE x=-20.02 y=99.16 path_position=0.85 +MOVE x=-17.75 y=95.87 path_position=0.85 +MOVE x=-15.29 y=92.72 path_position=0.86 +MOVE x=-12.65 y=89.72 path_position=0.87 +MOVE x=-9.84 y=86.87 path_position=0.87 +MOVE x=-6.86 y=84.20 path_position=0.88 +MOVE x=-3.74 y=81.70 path_position=0.89 +MOVE x=-0.48 y=79.39 path_position=0.89 +MOVE x=2.91 y=77.25 path_position=0.90 +MOVE x=6.40 y=75.30 path_position=0.90 +MOVE x=9.99 y=73.54 path_position=0.91 +MOVE x=13.66 y=71.96 path_position=0.92 +MOVE x=17.40 y=70.54 path_position=0.92 +MOVE x=21.20 y=69.28 path_position=0.93 +MOVE x=25.04 y=68.19 path_position=0.94 +MOVE x=28.93 y=67.24 path_position=0.94 +MOVE x=32.85 y=66.42 path_position=0.95 +MOVE x=36.79 y=65.74 path_position=0.96 +MOVE x=40.75 y=65.18 path_position=0.96 +MOVE x=44.72 y=64.74 path_position=0.97 +MOVE x=48.71 y=64.40 path_position=0.98 +MOVE x=52.70 y=64.17 path_position=0.98 +MOVE x=56.70 y=64.03 path_position=0.99 +MOVE x=60.70 y=64 path_position=0.99 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +MOVE x=64 y=64 path_position=1 +===== DELETE ===== +exists after delete = 0 +===== INVALID PATH ===== +exists = 0 +===== PATH TEST END ===== diff --git a/tests/automated-ci/paths/test.sh b/tests/automated-ci/paths/test.sh new file mode 100755 index 000000000..15842ff29 --- /dev/null +++ b/tests/automated-ci/paths/test.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -e + +RUNNER="${1:-../../../build/butterscotch}" +BASE="${2:-./path_test}" + +GAME="${BASE}.ios" +RAW="${BASE}_raw_output.txt" +ACTUAL="${BASE}_actual_output.txt" +EXPECTED="${BASE}_expected_output.txt" + +stdbuf -oL -eL "$RUNNER" "$GAME" --headless > "$RAW" 2>&1 + +grep '^Game: ' "$RAW" | sed 's/^Game: //' > "$ACTUAL" + +diff -u "$EXPECTED" "$ACTUAL" \ No newline at end of file