diff options
-rw-r--r-- | tests/custom/04_bugs/05_duplicate_resource_type (renamed from tests/custom/04_bugs/05_duplicate_ressource_type) | 12 | ||||
-rwxr-xr-x | tests/custom/run_tests.sh | 2 |
2 files changed, 9 insertions, 5 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 diff --git a/tests/custom/run_tests.sh b/tests/custom/run_tests.sh index ffca822..2f13c3b 100755 --- a/tests/custom/run_tests.sh +++ b/tests/custom/run_tests.sh @@ -80,7 +80,7 @@ run_testcase() { local fail=0 ( - cd "$topdir" + cd "$dir" IFS=$'\n' |