summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRoland Senn <rsx@bluewin.ch>2018-12-11 13:20:37 -0500
committerBen Gamari <ben@smart-cactus.org>2018-12-11 13:20:54 -0500
commit4c174dddc7b36ebf97ba0e182f843d563e3d598c (patch)
tree9fcd0e52ad3804338e86c78a343b81219309a36d /testsuite
parent54ee148c2b28d2326cfd273aed4842c2b53e2625 (diff)
downloadhaskell-4c174dddc7b36ebf97ba0e182f843d563e3d598c.tar.gz
Misleading msg with qualified imports "No module named X imported"
To check whether a given module has been imported, we do the following: From the list of all qualified names we extract the distinct module names to a list of module names. Then we check whether the given module name is in this list of module names. Test Plan: make test TEST=T14225 Reviewers: mpickering, hvr, monoidal, osa1, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #14225 Differential Revision: https://phabricator.haskell.org/D5331
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/rename/should_fail/T14225.script2
-rw-r--r--testsuite/tests/rename/should_fail/T14225.stderr3
-rw-r--r--testsuite/tests/rename/should_fail/all.T1
3 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/T14225.script b/testsuite/tests/rename/should_fail/T14225.script
new file mode 100644
index 0000000000..93f212f772
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T14225.script
@@ -0,0 +1,2 @@
+import qualified Data.Maybe as M
+M.fromJusr
diff --git a/testsuite/tests/rename/should_fail/T14225.stderr b/testsuite/tests/rename/should_fail/T14225.stderr
new file mode 100644
index 0000000000..f54e463e53
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/T14225.stderr
@@ -0,0 +1,3 @@
+<interactive>:2:1: error:
+ Not in scope: ‘M.fromJusr’
+ Perhaps you meant ‘M.fromJust’ (imported from Data.Maybe)
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index 6fd014356c..ba6975483a 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -129,6 +129,7 @@ test('T13644', normal, multimod_compile_fail, ['T13644','-v0'])
test('T13568', normal, multimod_compile_fail, ['T13568','-v0'])
test('T13947', normal, compile_fail, [''])
test('T13847', normal, multimod_compile_fail, ['T13847','-v0'])
+test('T14225', normal, ghci_script, ['T14225.script'])
test('T14307', normal, compile_fail, [''])
test('T14591', normal, compile_fail, [''])
test('T14907a', normal, compile_fail, [''])