summaryrefslogtreecommitdiff
path: root/Tests/Terminal/test_OutputBlock.gd
diff options
context:
space:
mode:
authorSophia Pearson <codergal89@gmail.com>2022-09-05 20:35:53 +0200
committerSophia Pearson <codergal89@gmail.com>2022-09-05 20:35:53 +0200
commitf20bd89dc4a7bf14a88b1effcaa1887b29314525 (patch)
treed114787f68efd2a7d61d95fa9c84e8e5d69a7c11 /Tests/Terminal/test_OutputBlock.gd
parent1b477b62f8be8c546a35dbd1d2688ebf623c496f (diff)
downloadtexty-f20bd89dc4a7bf14a88b1effcaa1887b29314525.tar.xz
texty-f20bd89dc4a7bf14a88b1effcaa1887b29314525.zip
gui: split GUI into Terminal components
Diffstat (limited to 'Tests/Terminal/test_OutputBlock.gd')
-rw-r--r--Tests/Terminal/test_OutputBlock.gd32
1 files changed, 32 insertions, 0 deletions
diff --git a/Tests/Terminal/test_OutputBlock.gd b/Tests/Terminal/test_OutputBlock.gd
new file mode 100644
index 0000000..f586c55
--- /dev/null
+++ b/Tests/Terminal/test_OutputBlock.gd
@@ -0,0 +1,32 @@
+extends GutTest
+
+const Scene = preload("res://Scenes/Terminal/OutputBlock.tscn")
+const OutputBlock = preload("res://Scripts/Terminal/OutputBlock.cs")
+
+const _input_text_changed = 'InputTextChanged'
+const _output_text_changed = 'OutputTextChanged'
+const _test_data = 'This is some test data'
+var _instance: OutputBlock = null
+
+
+func before_each():
+ _instance = add_child_autofree(Scene.instance())
+
+func after_all():
+ assert_no_new_orphans()
+
+func test_can_instantiate():
+ assert_not_null(_instance)
+
+func test_Content_is_empty_after_instantiation():
+ assert_eq(_instance.Content, '')
+
+func test_ContentLabel_bbcode_enabled_is_enabled_after_instantiation():
+ assert_true(_instance.get_node('ContentLabel').bbcode_enabled)
+
+func test_ContentLabel_is_empty_after_instantiation():
+ assert_eq(_instance.get_node('ContentLabel').bbcode_text, '')
+
+func test_setting_Content_sets_ContentLabel_bbcode_text():
+ _instance.Content = 'test'
+ assert_eq(_instance.get_node('ContentLabel').bbcode_text, 'test')