diff options
-rw-r--r-- | testsuite/tests/rts/T21465/T21465.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/rts/T21465/T21465.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/rts/T21465/T21465_c.c | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/testsuite/tests/rts/T21465/T21465.hs b/testsuite/tests/rts/T21465/T21465.hs index 1465359054..4346f06d9d 100644 --- a/testsuite/tests/rts/T21465/T21465.hs +++ b/testsuite/tests/rts/T21465/T21465.hs @@ -1,10 +1,12 @@ {-# LANGUAGE ForeignFunctionInterface #-} module Main where +import System.IO + foreign import ccall "test_c" testC :: IO () helper :: IO () -helper = putStrLn "This is the helper function" +helper = putStrLn "This is the helper function" >> hFlush stdout foreign export ccall helper :: IO () diff --git a/testsuite/tests/rts/T21465/T21465.stdout b/testsuite/tests/rts/T21465/T21465.stdout index 2ae74934f3..bb8fe2203d 100644 --- a/testsuite/tests/rts/T21465/T21465.stdout +++ b/testsuite/tests/rts/T21465/T21465.stdout @@ -1,5 +1,4 @@ This is the helper function -Done. 0: 01 01 1: 02 02 2: 03 03 @@ -16,3 +15,4 @@ Done. 13: 0e 0e 14: 0f 0f 15: 10 10 +Done. diff --git a/testsuite/tests/rts/T21465/T21465_c.c b/testsuite/tests/rts/T21465/T21465_c.c index 3351027a91..dc93e6becf 100644 --- a/testsuite/tests/rts/T21465/T21465_c.c +++ b/testsuite/tests/rts/T21465/T21465_c.c @@ -25,4 +25,5 @@ void test_c() { for (int i = 0; i < 16; i++) { printf("%2i: %02x %02x\n", i, blah[i], foo[i]); } + fflush(stdout); } |