summaryrefslogtreecommitdiff
path: root/Tests/ComponentTests/ParserTests/test_CommandParser.gd
diff options
context:
space:
mode:
authorSophia Pearson <codergal89@gmail.com>2022-05-23 00:02:58 +0200
committerSophia Pearson <codergal89@gmail.com>2022-05-23 00:02:58 +0200
commit6fe4972aa48a29d0aafee0461ccd6c635ca9ee6c (patch)
tree30ff503136f1d41ccbb35d3bb9fa6ab92f1e839a /Tests/ComponentTests/ParserTests/test_CommandParser.gd
parentf3c50714834d2d5cb204625c63aaeffb50bef236 (diff)
downloadtexty-6fe4972aa48a29d0aafee0461ccd6c635ca9ee6c.tar.xz
texty-6fe4972aa48a29d0aafee0461ccd6c635ca9ee6c.zip
commands: add basic command parser infrastructure
Diffstat (limited to 'Tests/ComponentTests/ParserTests/test_CommandParser.gd')
-rw-r--r--Tests/ComponentTests/ParserTests/test_CommandParser.gd9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/ComponentTests/ParserTests/test_CommandParser.gd b/Tests/ComponentTests/ParserTests/test_CommandParser.gd
new file mode 100644
index 0000000..bdb14a6
--- /dev/null
+++ b/Tests/ComponentTests/ParserTests/test_CommandParser.gd
@@ -0,0 +1,9 @@
+extends CommandParserTestBase
+
+const Command = preload("res://Scripts/Command.cs")
+
+func parse(input: String) -> Command:
+ return autofree(_instance.TryParse(input))
+
+func test_parsing_the_empty_string_returns_null():
+ assert_null(parse(''))