From: Skgland Date: Sat, 27 Sep 2025 20:05:51 +0000 (+0200) Subject: add regression test for issue 3073 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=2f43c3ff403134f6d2eed074bb74df6d0d6fde4f;p=scryer-prolog.git add regression test for issue 3073 --- 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 index 00000000..0e68f569 --- /dev/null +++ b/tests/scryer/cli/issues/ffi_alloc_mismatched_args.in/input.pl @@ -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 index 00000000..8dc5448c --- /dev/null +++ b/tests/scryer/cli/issues/ffi_alloc_mismatched_args.md @@ -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