[commit: ghc] master: Add (failing) test for #11247 (db97ed9)

git at git.haskell.org git at git.haskell.org
Tue Feb 2 17:25:02 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/db97ed9f91119bffa68e9d23acf1a08a8cd4e23c/ghc

>---------------------------------------------------------------

commit db97ed9f91119bffa68e9d23acf1a08a8cd4e23c
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Mon Dec 21 17:23:21 2015 +0100

    Add (failing) test for #11247


>---------------------------------------------------------------

db97ed9f91119bffa68e9d23acf1a08a8cd4e23c
 testsuite/tests/runghc/Makefile            | 12 ++++++++++++
 testsuite/tests/runghc/T11247-hs.hs        |  1 +
 testsuite/tests/runghc/T11247-lhs.lhs      |  1 +
 testsuite/tests/runghc/T11247-no-extension |  1 +
 testsuite/tests/runghc/T11247.stderr       |  2 ++
 testsuite/tests/runghc/T11247.stdout       |  5 +++++
 testsuite/tests/runghc/all.T               |  3 +++
 7 files changed, 25 insertions(+)

diff --git a/testsuite/tests/runghc/Makefile b/testsuite/tests/runghc/Makefile
index f96c829..c414f84 100644
--- a/testsuite/tests/runghc/Makefile
+++ b/testsuite/tests/runghc/Makefile
@@ -10,3 +10,15 @@ T7859:
 #compile.
 T8601:
 	-echo 'main = putStrLn "Hello World!"' | '$(RUNGHC)' -f '$(TEST_HC)' -hide-package --ghc-arg=bytestring
+
+T11247:
+	# Should all work:
+	'$(RUNGHC)' T11247-hs
+	'$(RUNGHC)' T11247-hs.hs
+	'$(RUNGHC)' T11247-lhs
+	'$(RUNGHC)' T11247-lhs.lhs
+	'$(RUNGHC)' T11247-no-extension
+	# Should print a "nice" error message that it can't find "foo." and
+	# "foo.bar"
+	-'$(RUNGHC)' foo.
+	-'$(RUNGHC)' foo.bar
diff --git a/testsuite/tests/runghc/T11247-hs.hs b/testsuite/tests/runghc/T11247-hs.hs
new file mode 100644
index 0000000..d88fc3c
--- /dev/null
+++ b/testsuite/tests/runghc/T11247-hs.hs
@@ -0,0 +1 @@
+main = print "hello from a .hs file"
diff --git a/testsuite/tests/runghc/T11247-lhs.lhs b/testsuite/tests/runghc/T11247-lhs.lhs
new file mode 100644
index 0000000..307f328
--- /dev/null
+++ b/testsuite/tests/runghc/T11247-lhs.lhs
@@ -0,0 +1 @@
+> main = print "hello from a .lhs file"
diff --git a/testsuite/tests/runghc/T11247-no-extension b/testsuite/tests/runghc/T11247-no-extension
new file mode 100644
index 0000000..4248384
--- /dev/null
+++ b/testsuite/tests/runghc/T11247-no-extension
@@ -0,0 +1 @@
+main = print "hello from a file without extension"
diff --git a/testsuite/tests/runghc/T11247.stderr b/testsuite/tests/runghc/T11247.stderr
new file mode 100644
index 0000000..1c80dee
--- /dev/null
+++ b/testsuite/tests/runghc/T11247.stderr
@@ -0,0 +1,2 @@
+target ‘foo.’ is not a module name or a source file
+target ‘foo.bar’ is not a module name or a source file
diff --git a/testsuite/tests/runghc/T11247.stdout b/testsuite/tests/runghc/T11247.stdout
new file mode 100644
index 0000000..4e76a85
--- /dev/null
+++ b/testsuite/tests/runghc/T11247.stdout
@@ -0,0 +1,5 @@
+"hello from a .hs file"
+"hello from a .hs file"
+"hello from a .lhs file"
+"hello from a .lhs file"
+"hello from a file without extension"
diff --git a/testsuite/tests/runghc/all.T b/testsuite/tests/runghc/all.T
index 3ffaa20..0403fbc 100644
--- a/testsuite/tests/runghc/all.T
+++ b/testsuite/tests/runghc/all.T
@@ -3,3 +3,6 @@ test('T7859', req_interp, run_command,
 
 test('T8601', req_interp, run_command,
      ['$MAKE --no-print-directory -s T8601'])
+
+test('T11247', [req_interp, expect_broken(11247)], run_command,
+     ['$MAKE --no-print-directory -s T11247'])



More information about the ghc-commits mailing list