mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-03 20:14:22 +02:00
parent
115521f645
commit
09dc080a2e
8 changed files with 98 additions and 0 deletions
27
test/unit/terminal.test.gd
Normal file
27
test/unit/terminal.test.gd
Normal file
|
@ -0,0 +1,27 @@
|
|||
extends WAT.Test
|
||||
|
||||
var term: GDXterm.Terminal
|
||||
|
||||
|
||||
func pre():
|
||||
term = GDXterm.Terminal.new()
|
||||
term.rect_size = Vector2(400, 200)
|
||||
add_child(term)
|
||||
|
||||
|
||||
func post():
|
||||
term.free()
|
||||
|
||||
|
||||
func after():
|
||||
term.free()
|
||||
|
||||
|
||||
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(until_signal(term, "bell", 1), YIELD)
|
||||
asserts.signal_was_emitted_x_times(term, "bell", 5)
|
Loading…
Add table
Add a link
Reference in a new issue