diff options
Diffstat (limited to 'testsuite/tests/ghci.debugger')
4 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/T1620.script b/testsuite/tests/ghci.debugger/scripts/T1620.script new file mode 100644 index 0000000000..17d38d5530 --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/T1620.script @@ -0,0 +1,18 @@ +-- Test 1: No hanging breakpoints after :cd +:cd T1620 +:l T1620.hs +:break 2 +:cd .. +:break 2 +:show breaks +:cd T1620 +:l T1620.hs +:main +:l T1620.hs +-- Test 2: Non hanging breakpoints after :set <some-package-flag> +:break 2 +:set -no-user-package-db +:show breaks +:l T1620.hs +:main +:l T1620.hs diff --git a/testsuite/tests/ghci.debugger/scripts/T1620.stdout b/testsuite/tests/ghci.debugger/scripts/T1620.stdout new file mode 100644 index 0000000000..fc453c2b60 --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/T1620.stdout @@ -0,0 +1,9 @@ +Breakpoint 0 activated at T1620.hs:2:16-47 +Warning: changing directory causes all loaded modules to be unloaded, +because the search path has changed. +No modules are loaded with debugging support. +No active breakpoints. +[1,3,4,7,10] +Breakpoint 1 activated at T1620.hs:2:16-47 +No active breakpoints. +[1,3,4,7,10] diff --git a/testsuite/tests/ghci.debugger/scripts/T1620/T1620.hs b/testsuite/tests/ghci.debugger/scripts/T1620/T1620.hs new file mode 100644 index 0000000000..7c97826676 --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/T1620/T1620.hs @@ -0,0 +1,5 @@ +qsort [] = [] +qsort (a:as) = qsort left ++ [a] ++ qsort right + where (left,right) = (filter (<=a) as, filter (>a) as) + +main = print $ qsort [4, 1, 7, 10, 3] diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T index bc3d025dcd..8460fbb809 100644 --- a/testsuite/tests/ghci.debugger/scripts/all.T +++ b/testsuite/tests/ghci.debugger/scripts/all.T @@ -100,6 +100,8 @@ test('hist001', [extra_files(['../Test3.hs']), extra_run_opts('+RTS -I0')], test('hist002', [extra_files(['../Test3.hs']), extra_run_opts('+RTS -I0')], ghci_script, ['hist002.script']) +test('T1620', extra_files(['T1620/', 'T1620/T1620.hs']), + ghci_script, ['T1620.script']) test('T2740', normal, ghci_script, ['T2740.script']) test('getargs', extra_files(['../getargs.hs']), ghci_script, ['getargs.script']) |