From 2f43c3ff403134f6d2eed074bb74df6d0d6fde4f Mon Sep 17 00:00:00 2001 From: Skgland Date: Sat, 27 Sep 2025 22:05:51 +0200 Subject: [PATCH] add regression test for issue 3073 --- .../cli/issues/ffi_alloc_mismatched_args.in/input.pl | 7 +++++++ tests/scryer/cli/issues/ffi_alloc_mismatched_args.md | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 tests/scryer/cli/issues/ffi_alloc_mismatched_args.in/input.pl create mode 100644 tests/scryer/cli/issues/ffi_alloc_mismatched_args.md 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 -- 2.54.0