mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-04 12:14:24 +02:00
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:
parent
39702646dc
commit
115521f645
10 changed files with 165 additions and 162 deletions
31
test/integration/uv_utils.test.gd
Normal file
31
test/integration/uv_utils.test.gd
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue