summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts/parser-warnings
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/tests/scripts/parser-warnings')
-rw-r--r--modules/gdscript/tests/scripts/parser-warnings/unused-variable.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser-warnings/unused-variable.out5
2 files changed, 7 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser-warnings/unused-variable.gd b/modules/gdscript/tests/scripts/parser-warnings/unused-variable.gd
new file mode 100644
index 0000000000..68e3bd424f
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser-warnings/unused-variable.gd
@@ -0,0 +1,2 @@
+func test():
+ var unused = "not used"
diff --git a/modules/gdscript/tests/scripts/parser-warnings/unused-variable.out b/modules/gdscript/tests/scripts/parser-warnings/unused-variable.out
new file mode 100644
index 0000000000..270e0e69c0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser-warnings/unused-variable.out
@@ -0,0 +1,5 @@
+GDTEST_OK
+>> WARNING
+>> Line: 2
+>> UNUSED_VARIABLE
+>> The local variable 'unused' is declared but never used in the block. If this is intended, prefix it with an underscore: '_unused'