summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T17989.script12
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T17989.stdout20
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T17989A.hs13
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T17989B.hs13
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T17989C.hs7
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T17989M.hs6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/all.T1
7 files changed, 72 insertions, 0 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/T17989.script b/testsuite/tests/ghci.debugger/scripts/T17989.script
new file mode 100644
index 0000000000..86f3f70e93
--- /dev/null
+++ b/testsuite/tests/ghci.debugger/scripts/T17989.script
@@ -0,0 +1,12 @@
+:l T17989M
+:complete repl ":break "
+-- all listed names are really breakpoints
+:break B.bar
+:break B.foo
+:break T17989A.bar
+:break T17989A.foo
+:break T17989C.foo
+:break foo
+:break main
+:complete repl ":break B."
+:complete repl ":break f"
diff --git a/testsuite/tests/ghci.debugger/scripts/T17989.stdout b/testsuite/tests/ghci.debugger/scripts/T17989.stdout
new file mode 100644
index 0000000000..ce658ace22
--- /dev/null
+++ b/testsuite/tests/ghci.debugger/scripts/T17989.stdout
@@ -0,0 +1,20 @@
+7 7 ":break "
+"B.bar"
+"B.foo"
+"T17989A.bar"
+"T17989A.foo"
+"T17989C.foo"
+"foo"
+"main"
+Breakpoint 0 activated at T17989B.hs:10:9-25
+Breakpoint 1 activated at T17989B.hs:7:6-11
+Breakpoint 2 activated at T17989A.hs:10:7-13
+Breakpoint 3 activated at T17989A.hs:4:9-14
+Breakpoint 4 activated at T17989C.hs:4:9-26
+Breakpoint 4 was already set at T17989C.hs:4:9-26
+Breakpoint 5 activated at T17989M.hs:6:8-51
+2 2 ":break "
+"B.bar"
+"B.foo"
+1 1 ":break "
+"foo"
diff --git a/testsuite/tests/ghci.debugger/scripts/T17989A.hs b/testsuite/tests/ghci.debugger/scripts/T17989A.hs
new file mode 100644
index 0000000000..32dfef5e85
--- /dev/null
+++ b/testsuite/tests/ghci.debugger/scripts/T17989A.hs
@@ -0,0 +1,13 @@
+module T17989A (foo, bar) where
+
+foo :: Int -> String
+foo n = x <> y
+ where
+ x = "A.foo-"
+ y = priv n
+
+bar :: String
+bar = "A.bar"
+
+priv :: Int -> String
+priv n = "A.foo-" <> show n
diff --git a/testsuite/tests/ghci.debugger/scripts/T17989B.hs b/testsuite/tests/ghci.debugger/scripts/T17989B.hs
new file mode 100644
index 0000000000..e48067f936
--- /dev/null
+++ b/testsuite/tests/ghci.debugger/scripts/T17989B.hs
@@ -0,0 +1,13 @@
+module T17989B (foo, bar) where
+
+foo :: Int -> String
+foo n =
+ let x = "B.foo-"
+ y = priv n
+ in x <> y
+
+bar :: Int -> String
+bar n = "B.bar" <> show n
+
+priv :: Int -> String
+priv n = "B.foo-" <> show n
diff --git a/testsuite/tests/ghci.debugger/scripts/T17989C.hs b/testsuite/tests/ghci.debugger/scripts/T17989C.hs
new file mode 100644
index 0000000000..c53471e14d
--- /dev/null
+++ b/testsuite/tests/ghci.debugger/scripts/T17989C.hs
@@ -0,0 +1,7 @@
+module T17989C (foo) where
+
+foo :: Int -> String
+foo n = "C.foo-" <> priv n
+
+priv :: Int -> String
+priv n = "C.foo-" <> show n
diff --git a/testsuite/tests/ghci.debugger/scripts/T17989M.hs b/testsuite/tests/ghci.debugger/scripts/T17989M.hs
new file mode 100644
index 0000000000..c6d77072c2
--- /dev/null
+++ b/testsuite/tests/ghci.debugger/scripts/T17989M.hs
@@ -0,0 +1,6 @@
+import qualified T17989A
+import qualified T17989B as B
+import T17989C
+
+main :: IO ()
+main = putStrLn (T17989A.foo 3 <> B.foo 5 <> foo 7)
diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T
index db597a455f..12fe420363 100644
--- a/testsuite/tests/ghci.debugger/scripts/all.T
+++ b/testsuite/tests/ghci.debugger/scripts/all.T
@@ -125,3 +125,4 @@ test('T16700', normal, ghci_script, ['T16700.script'])
test('break029', extra_files(['break029.hs']), ghci_script, ['break029.script'])
test('T2215', normal, ghci_script, ['T2215.script'])
+test('T17989', normal, ghci_script, ['T17989.script'])