summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/04_bugs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-02-03 11:55:23 +0100
committerJo-Philipp Wich <jo@mein.io>2022-02-03 11:58:31 +0100
commit7a65c14a8fa7b010c4e25a2519f7599173ed328f (patch)
tree622c5e9b676415e8e23125254a3b9a25f98e2362 /tests/custom/04_bugs
parentafec8d7c5b9c8150db6ddf0c483bd64dee0444d6 (diff)
run_tests.sh: change workdir to testcase directory during execution
Ensure that that the testcase files are executed within the temporary testcase work directory to simplify testing relative path resolution. Also fixup the duplicate resource regression test breaking due to that. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom/04_bugs')
-rw-r--r--tests/custom/04_bugs/05_duplicate_resource_type (renamed from tests/custom/04_bugs/05_duplicate_ressource_type)12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/custom/04_bugs/05_duplicate_ressource_type b/tests/custom/04_bugs/05_duplicate_resource_type
index 21166b2..6d8d8f5 100644
--- a/tests/custom/04_bugs/05_duplicate_ressource_type
+++ b/tests/custom/04_bugs/05_duplicate_resource_type
@@ -1,5 +1,5 @@
-When requiring a C module that registers custom ressource types multiple
-times, ressource values instantiated after subsequent requires of the
+When requiring a C module that registers custom resource types multiple
+times, resource values instantiated after subsequent requires of the
same extensions didn't properly function since the internal type prototype
was resolved to the initial copy and subsequently discarded due to an index
mismatch.
@@ -7,7 +7,7 @@ mismatch.
-- Testcase --
{%
fs = require("fs");
- fd = fs.open("README.md");
+ fd = fs.open("files/test.txt");
printf("fd.read() #1: %s\n",
fd.read("line") ? "working" : "not working (" + fd.error() + ")");
@@ -16,7 +16,7 @@ mismatch.
fs = require("fs");
- fd = fs.open("README.md");
+ fd = fs.open("files/test.txt");
printf("fd.read() #2: %s\n",
fd.read("line") ? "working" : "not working (" + fd.error() + ")");
@@ -25,6 +25,10 @@ mismatch.
%}
-- End --
+-- File test.txt --
+A random line.
+-- End --
+
-- Expect stdout --
fd.read() #1: working
fd.read() #2: working