From 45fe368a88cc55768d420943eec38d2e956c0f86 Mon Sep 17 00:00:00 2001 From: Fee Date: Sun, 19 Feb 2023 23:10:28 +0100 Subject: [PATCH] test working --- .github/workflows/gut_unit_tests.yml | 2 +- demo/Main.tscn | 68 ++++++++++++++++++++++++---- demo/tests/unit/test_open_close.gd | 2 +- 3 files changed, 62 insertions(+), 10 deletions(-) diff --git a/.github/workflows/gut_unit_tests.yml b/.github/workflows/gut_unit_tests.yml index 3582667..c30bb7a 100644 --- a/.github/workflows/gut_unit_tests.yml +++ b/.github/workflows/gut_unit_tests.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Gut (gut.sh) + - name: Gut run: | cd demo/ godot -s --path $PWD addons/gut/gut_cmdln.gd -gdir=res://tests -glog=1 -ginclude_subdirs -gexit diff --git a/demo/Main.tscn b/demo/Main.tscn index d9f4101..35bf434 100644 --- a/demo/Main.tscn +++ b/demo/Main.tscn @@ -1,12 +1,64 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=4 format=2] -[ext_resource path="res://addons/gut/plugin_control.gd" type="Script" id=3] +[ext_resource path="res://database.gd" type="Script" id=1] +[ext_resource path="res://Main.gd" type="Script" id=2] -[node name="Gut" type="Control"] +[sub_resource type="StyleBoxFlat" id=1] +content_margin_left = 24.0 +content_margin_right = 24.0 +content_margin_top = 12.0 +content_margin_bottom = 12.0 +bg_color = Color( 0, 0, 0, 1 ) + +[node name="Main" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 2 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Database" type="Node" parent="."] +script = ExtResource( 1 ) + +[node name="MarginContainer" type="MarginContainer" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -rect_min_size = Vector2( 740, 250 ) -script = ExtResource( 3 ) -_run_on_load = true -_include_subdirectories = true -_directory1 = "res://tests/unit" +custom_constants/margin_right = 24 +custom_constants/margin_top = 24 +custom_constants/margin_left = 24 +custom_constants/margin_bottom = 24 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +margin_left = 24.0 +margin_top = 24.0 +margin_right = 1000.0 +margin_bottom = 576.0 +custom_constants/separation = 24 + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"] +margin_right = 976.0 +margin_bottom = 14.0 +text = "Godot SQLite Demo" +align = 1 + +[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/VBoxContainer"] +margin_top = 38.0 +margin_right = 976.0 +margin_bottom = 552.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +custom_styles/bg = SubResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/ScrollContainer"] +margin_left = 24.0 +margin_top = 12.0 +margin_right = 952.0 +margin_bottom = 12.0 +size_flags_horizontal = 3 diff --git a/demo/tests/unit/test_open_close.gd b/demo/tests/unit/test_open_close.gd index ee085ec..3610031 100644 --- a/demo/tests/unit/test_open_close.gd +++ b/demo/tests/unit/test_open_close.gd @@ -25,7 +25,7 @@ func copy_data_to_user() -> void: gut.p("An error occurred when trying to access the path.") func before_all(): - if OS.get_name() in ["Android", "iOS", "HTML5", "X11"]: + if OS.get_name() in ["Android", "iOS", "HTML5"]: copy_data_to_user() db_name = "user://data/test" else: