]> Repositorios git - scryer-prolog.git/commitdiff
add regression test for issue 3073
authorSkgland <[email protected]>
Sat, 27 Sep 2025 20:05:51 +0000 (22:05 +0200)
committerBennet Bleßmann <[email protected]>
Sat, 27 Sep 2025 20:05:51 +0000 (22:05 +0200)
tests/scryer/cli/issues/ffi_alloc_mismatched_args.in/input.pl [new file with mode: 0644]
tests/scryer/cli/issues/ffi_alloc_mismatched_args.md [new file with mode: 0644]

diff --git a/tests/scryer/cli/issues/ffi_alloc_mismatched_args.in/input.pl b/tests/scryer/cli/issues/ffi_alloc_mismatched_args.in/input.pl
new file mode 100644 (file)
index 0000000..0e68f56
--- /dev/null
@@ -0,0 +1,7 @@
+:- use_module(library(ffi)).
+
+
+test :- ffi:array_type(u8, 2, Type), ffi:allocate(rust, Type, [Type, 0], _ArrayPtr).
+
+?- test.
+   error(system_error,'$ffi_allocate'/4).
\ No newline at end of file
diff --git a/tests/scryer/cli/issues/ffi_alloc_mismatched_args.md b/tests/scryer/cli/issues/ffi_alloc_mismatched_args.md
new file mode 100644 (file)
index 0000000..8dc5448
--- /dev/null
@@ -0,0 +1,5 @@
+```trycmd
+$ scryer-prolog -f --no-add-history input.pl -g test -g halt
+test causes: error(system_error,$ffi_allocate/4)
+
+```
\ No newline at end of file