mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-25 18:50:25 +01:00
b08d218a59
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.
19 lines
454 B
GDScript
19 lines
454 B
GDScript
extends "res://addons/gut/test.gd"
|
|
|
|
var term: GDXterm.Terminal
|
|
|
|
|
|
func before_each():
|
|
term = GDXterm.Terminal.new()
|
|
term.rect_size = Vector2(400, 200)
|
|
add_child_autofree(term)
|
|
|
|
|
|
func test_bell() -> void:
|
|
term.write(char(7))
|
|
term.write(char(0x07))
|
|
term.write("\a")
|
|
term.write("\u0007")
|
|
term.write("'Ask not for whom the \a tolls; it tolls for thee' - John Donne")
|
|
yield(yield_to(term, "bell", 1), YIELD)
|
|
assert_signal_emit_count(term, "bell", 5)
|