summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/03_bugs/04_property_set_abort
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-04-27 12:43:38 +0200
committerGitHub <noreply@github.com>2021-04-27 12:43:38 +0200
commit8469c4b1be228f42c46f08852f028f7801b93cc9 (patch)
treef61121e8f89e39787a960e621fc8492e57fc4bc0 /tests/custom/03_bugs/04_property_set_abort
parentf360350bd874aeec0806c8df02c7a20a54c44406 (diff)
parent64eec7f90e945696572ee076b75d1f35e8f2248a (diff)
Merge pull request #5 from jow-/new-type-system
New type system
Diffstat (limited to 'tests/custom/03_bugs/04_property_set_abort')
-rw-r--r--tests/custom/03_bugs/04_property_set_abort76
1 files changed, 76 insertions, 0 deletions
diff --git a/tests/custom/03_bugs/04_property_set_abort b/tests/custom/03_bugs/04_property_set_abort
new file mode 100644
index 0000000..8af477f
--- /dev/null
+++ b/tests/custom/03_bugs/04_property_set_abort
@@ -0,0 +1,76 @@
+When attempting to set a property on a non-array, non-object value the
+VM aborted due to an assert triggered by libjson-c.
+
+-- Testcase --
+{% (null).x = 1 %}
+-- End --
+
+-- Expect stderr --
+Type error: attempt to set property on null value
+In line 1, byte 15:
+
+ `{% (null).x = 1 %}`
+ Near here ----^
+
+
+-- End --
+
+
+-- Testcase --
+{% (1).x = 1 %}
+-- End --
+
+-- Expect stderr --
+Type error: attempt to set property on integer value
+In line 1, byte 12:
+
+ `{% (1).x = 1 %}`
+ Near here -^
+
+
+-- End --
+
+
+-- Testcase --
+{% (1.2).x = 1 %}
+-- End --
+
+-- Expect stderr --
+Type error: attempt to set property on double value
+In line 1, byte 14:
+
+ `{% (1.2).x = 1 %}`
+ Near here ---^
+
+
+-- End --
+
+
+-- Testcase --
+{% (true).x = 1 %}
+-- End --
+
+-- Expect stderr --
+Type error: attempt to set property on boolean value
+In line 1, byte 15:
+
+ `{% (true).x = 1 %}`
+ Near here ----^
+
+
+-- End --
+
+
+-- Testcase --
+{% ("test").x = 1 %}
+-- End --
+
+-- Expect stderr --
+Type error: attempt to set property on string value
+In line 1, byte 17:
+
+ `{% ("test").x = 1 %}`
+ Near here ------^
+
+
+-- End --