Skip to content

Commit

Permalink
test working
Browse files Browse the repository at this point in the history
  • Loading branch information
feefladder committed Feb 19, 2023
1 parent d3547f6 commit 45fe368
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gut_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
68 changes: 60 additions & 8 deletions demo/Main.tscn
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion demo/tests/unit/test_open_close.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 45fe368

Please sign in to comment.