From d143e80303d454babfa2184f5d804a7a61222233 Mon Sep 17 00:00:00 2001 From: nineonine Date: Fri, 29 May 2020 23:40:16 -0700 Subject: Add test for #17669 --- testsuite/tests/ghci/scripts/T17669.script | 7 +++++++ testsuite/tests/ghci/scripts/T17669.stdout | 6 ++++++ testsuite/tests/ghci/scripts/all.T | 1 + 3 files changed, 14 insertions(+) create mode 100644 testsuite/tests/ghci/scripts/T17669.script create mode 100644 testsuite/tests/ghci/scripts/T17669.stdout diff --git a/testsuite/tests/ghci/scripts/T17669.script b/testsuite/tests/ghci/scripts/T17669.script new file mode 100644 index 0000000000..88cd8e36df --- /dev/null +++ b/testsuite/tests/ghci/scripts/T17669.script @@ -0,0 +1,7 @@ +:set -v1 +System.IO.writeFile "T17669.hs" "module T17669 where main :: IO ();main = putStrLn \"this\"" +:load T17669.hs +:main +System.IO.writeFile "T17669.hs" "module T17669 where main :: IO ();main = putStrLn \"that\"" +:reload +:main diff --git a/testsuite/tests/ghci/scripts/T17669.stdout b/testsuite/tests/ghci/scripts/T17669.stdout new file mode 100644 index 0000000000..a62c5ee82e --- /dev/null +++ b/testsuite/tests/ghci/scripts/T17669.stdout @@ -0,0 +1,6 @@ +[1 of 1] Compiling T17669 ( T17669.hs, T17669.o ) +Ok, one module loaded. +this +[1 of 1] Compiling T17669 ( T17669.hs, T17669.o ) +Ok, one module loaded. +that diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index fd0ac2ce3a..0a05e1dffa 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -314,3 +314,4 @@ test('T17384', normal, ghci_script, ['T17384.script']) test('T17403', normal, ghci_script, ['T17403.script']) test('T17431', normal, ghci_script, ['T17431.script']) test('T17549', normal, ghci_script, ['T17549.script']) +test('T17669', [extra_run_opts('-fexternal-interpreter -fobject-code'), expect_broken(17669)], ghci_script, ['T17669.script']) -- cgit v1.2.1