From b1eed26f10645e8d918402b7fc29b07e0b294757 Mon Sep 17 00:00:00 2001
From: Cheng Shao <terrorjack@type.dance>
Date: Thu, 24 Oct 2024 20:55:42 +0200
Subject: [PATCH] testsuite: add T25414 test case marked as broken

This commit adds T25414 test case to demonstrate #25414. It is marked
as broken and will be fixed by the next commit.
---
 testsuite/tests/ghci/scripts/T25414.script | 6 ++++++
 testsuite/tests/ghci/scripts/all.T         | 1 +
 2 files changed, 7 insertions(+)
 create mode 100644 testsuite/tests/ghci/scripts/T25414.script

diff --git a/testsuite/tests/ghci/scripts/T25414.script b/testsuite/tests/ghci/scripts/T25414.script
new file mode 100644
index 00000000000..3824461d131
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T25414.script
@@ -0,0 +1,6 @@
+:set -XCApiFFI
+import Foreign
+import Foreign.C
+foreign import capi unsafe "stdlib.h malloc" c_malloc :: CSize -> IO (Ptr ())
+foreign import capi unsafe "stdlib.h free" c_free :: Ptr () -> IO ()
+c_free =<< c_malloc 16
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index d5842c66319..1da5d6ff733 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -360,6 +360,7 @@ test('T20455', normal, ghci_script, ['T20455.script'])
 test('shadow-bindings', normal, ghci_script, ['shadow-bindings.script'])
 test('T925', normal, ghci_script, ['T925.script'])
 test('T7388', normal, ghci_script, ['T7388.script'])
+test('T25414', [expect_broken(25414)], ghci_script, ['T25414.script'])
 test('T20627', normal, ghci_script, ['T20627.script'])
 test('T20473a', normal, ghci_script, ['T20473a.script'])
 test('T20473b', normal, ghci_script, ['T20473b.script'])
-- 
GitLab