diff options
Diffstat (limited to 'testsuite/tests/ghci.debugger/scripts/break023')
8 files changed, 41 insertions, 0 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/break023/A.hs b/testsuite/tests/ghci.debugger/scripts/break023/A.hs new file mode 100644 index 0000000000..138a4faa1c --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break023/A.hs @@ -0,0 +1,2 @@ +module A where +import {-# SOURCE #-} B diff --git a/testsuite/tests/ghci.debugger/scripts/break023/B.hs b/testsuite/tests/ghci.debugger/scripts/break023/B.hs new file mode 100644 index 0000000000..cfc9682cbd --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break023/B.hs @@ -0,0 +1,5 @@ +module B where + +import A + +b x = x
\ No newline at end of file diff --git a/testsuite/tests/ghci.debugger/scripts/break023/B.hs-boot b/testsuite/tests/ghci.debugger/scripts/break023/B.hs-boot new file mode 100644 index 0000000000..8e73321e9f --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break023/B.hs-boot @@ -0,0 +1,3 @@ +module B where + +b :: a -> a
\ No newline at end of file diff --git a/testsuite/tests/ghci.debugger/scripts/break023/C.hs b/testsuite/tests/ghci.debugger/scripts/break023/C.hs new file mode 100644 index 0000000000..0dd15af7e7 --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break023/C.hs @@ -0,0 +1,5 @@ +module C where + +import A +import B + diff --git a/testsuite/tests/ghci.debugger/scripts/break023/Makefile b/testsuite/tests/ghci.debugger/scripts/break023/Makefile new file mode 100644 index 0000000000..1c39d1c1fe --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break023/Makefile @@ -0,0 +1,3 @@ +TOP=../../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghci.debugger/scripts/break023/all.T b/testsuite/tests/ghci.debugger/scripts/break023/all.T new file mode 100644 index 0000000000..3858849735 --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break023/all.T @@ -0,0 +1,4 @@ +setTestOpts(extra_run_opts('-ignore-dot-ghci')) +setTestOpts(if_compiler_profiled(skip)) + +test('break023', normal, ghci_script, ['break023.script']) diff --git a/testsuite/tests/ghci.debugger/scripts/break023/break023.script b/testsuite/tests/ghci.debugger/scripts/break023/break023.script new file mode 100644 index 0000000000..4ddd2d6be4 --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break023/break023.script @@ -0,0 +1,17 @@ + +-- We have this structure of modules: + +-- A (imports B.boot) +-- B (imports A) +-- B.boot (imports A) +-- C (imports A and B) + +-- And we load C, to debug some function called b in B. +-- But first we touch A, and reload. B.boot will be reloaded, but not B, which will end up with an empty modbreaks. We can no longer set a breakpoint in B.b +-- The effect we want is B.boot being reloaded while B is not. + +:l C +:break b -- it works ok at this point +:! touch A.hs +:r +:break b -- it does not work anymore diff --git a/testsuite/tests/ghci.debugger/scripts/break023/break023.stdout b/testsuite/tests/ghci.debugger/scripts/break023/break023.stdout new file mode 100644 index 0000000000..2b6c85daf4 --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/break023/break023.stdout @@ -0,0 +1,2 @@ +Breakpoint 0 activated at B.hs:5:1-7 +Breakpoint 1 activated at B.hs:5:1-7 |