Replace Gut with WAT

Gut was freezing on some integration tests. It was also entering an
infinite loop after exiting (even after closing Godot and VSCode) which
caused a `godot.log` file in app_userdata to keep growing until my hard
drive was full.
This commit is contained in:
Leroy Hopson 2021-07-03 20:54:34 +07:00
parent 39702646dc
commit 115521f645
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
10 changed files with 165 additions and 162 deletions

View file

@ -0,0 +1,31 @@
extends WAT.Test
const LibuvUtils = preload("res://addons/godot_xterm/nodes/pty/libuv_utils.gd")
const EMPTY_VAR = "GODOT_XTERM_TEST_EMPTY_ENV_VAR"
const TEST_VAR = "GODOT_XTERM_TEST_ENV_VAR"
const TEST_VAL = "TEST123"
var env: Dictionary
func pre():
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)
func test_empty_var_has_empty_val():
asserts.is_equal(env[EMPTY_VAR], "")
func test_has_test_var():
asserts.has(TEST_VAR, env)
func test_test_var_has_correct_val():
asserts.is_equal(env[TEST_VAR], TEST_VAL)