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,4 +1,4 @@
extends WAT.Test
extends "res://addons/gut/test.gd"
const LibuvUtils = preload("res://addons/godot_xterm/nodes/pty/libuv_utils.gd")
@ -9,23 +9,23 @@ const TEST_VAL = "TEST123"
var env: Dictionary
func pre():
func before_each():
assert(OS.set_environment(EMPTY_VAR, ""))
assert(OS.set_environment(TEST_VAR, TEST_VAL))
env = LibuvUtils.get_os_environ()
func test_has_empty_var():
asserts.has(EMPTY_VAR, env)
assert_has(env, EMPTY_VAR)
func test_empty_var_has_empty_val():
asserts.is_equal(env[EMPTY_VAR], "")
assert_eq(env[EMPTY_VAR], "")
func test_has_test_var():
asserts.has(TEST_VAR, env)
assert_has(env, TEST_VAR)
func test_test_var_has_correct_val():
asserts.is_equal(env[TEST_VAR], TEST_VAL)
assert_eq(env[TEST_VAR], TEST_VAL)