summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci.debugger
diff options
context:
space:
mode:
authorRoland Senn <rsx@bluewin.ch>2019-05-29 22:12:41 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-07 10:22:47 -0400
commitd1dc0ed75be0dafb0be3b4ff5e839612702eab47 (patch)
tree6dcd41b2d70b5715aa0c191c2242eaf409c1c5a7 /testsuite/tests/ghci.debugger
parent0b7372f68c0bc9cafc30e227b574abf1d5b16df5 (diff)
downloadhaskell-d1dc0ed75be0dafb0be3b4ff5e839612702eab47.tar.gz
Fix #16700: Tiny errors in output of GHCi commands :forward and :info
`:info Coercible` now outputs the correct section number of the GHCi User's guide together with the secion title. `:forward x` gives the correct syntax hint.
Diffstat (limited to 'testsuite/tests/ghci.debugger')
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T16700.hs6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T16700.script4
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T16700.stdout7
-rw-r--r--testsuite/tests/ghci.debugger/scripts/all.T1
4 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/T16700.hs b/testsuite/tests/ghci.debugger/scripts/T16700.hs
new file mode 100644
index 0000000000..1a2ceb029f
--- /dev/null
+++ b/testsuite/tests/ghci.debugger/scripts/T16700.hs
@@ -0,0 +1,6 @@
+qsort :: [Int] -> [Int]
+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/T16700.script b/testsuite/tests/ghci.debugger/scripts/T16700.script
new file mode 100644
index 0000000000..7328cb4b4d
--- /dev/null
+++ b/testsuite/tests/ghci.debugger/scripts/T16700.script
@@ -0,0 +1,4 @@
+:l T16700.hs
+:break 3
+:main
+:forward x
diff --git a/testsuite/tests/ghci.debugger/scripts/T16700.stdout b/testsuite/tests/ghci.debugger/scripts/T16700.stdout
new file mode 100644
index 0000000000..d9fd775230
--- /dev/null
+++ b/testsuite/tests/ghci.debugger/scripts/T16700.stdout
@@ -0,0 +1,7 @@
+Breakpoint 0 activated at T16700.hs:3:16-47
+Stopped in Main.qsort, T16700.hs:3:16-47
+_result :: [Int] = _
+a :: Int = 4
+left :: [Int] = _
+right :: [Int] = _
+Syntax: :forward [num]
diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T
index 7240594823..5708b631fb 100644
--- a/testsuite/tests/ghci.debugger/scripts/all.T
+++ b/testsuite/tests/ghci.debugger/scripts/all.T
@@ -108,5 +108,6 @@ test('T8557', normal, ghci_script, ['T8557.script'])
test('T12458', normal, ghci_script, ['T12458.script'])
test('T13825-debugger', when(arch('powerpc64'), expect_broken(14455)),
ghci_script, ['T13825-debugger.script'])
+test('T16700', normal, ghci_script, ['T16700.script'])
test('break029', extra_files(['break029.hs']), ghci_script, ['break029.script'])