Run tests in CI environment

Currently tests only run on X11.64 platform.
But other platforms can be supported with a bit of effort.
Remove default bell sound as it does not play nicely with CI environment
that does not have sound card.
This commit is contained in:
Leroy Hopson 2021-07-18 19:15:08 +07:00
parent 8bc3a13adb
commit b08d218a59
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
13 changed files with 154 additions and 40 deletions

View file

@ -1,20 +1,12 @@
extends WAT.Test
extends "res://addons/gut/test.gd"
var term: GDXterm.Terminal
func pre():
func before_each():
term = GDXterm.Terminal.new()
term.rect_size = Vector2(400, 200)
add_child(term)
func post():
term.free()
func after():
term.free()
add_child_autofree(term)
func test_bell() -> void:
@ -23,5 +15,5 @@ func test_bell() -> void:
term.write("\a")
term.write("\u0007")
term.write("'Ask not for whom the \a tolls; it tolls for thee' - John Donne")
yield(until_signal(term, "bell", 1), YIELD)
asserts.signal_was_emitted_x_times(term, "bell", 5)
yield(yield_to(term, "bell", 1), YIELD)
assert_signal_emit_count(term, "bell", 5)