summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-12-21 17:23:21 +0100
committerThomas Miedema <thomasmiedema@gmail.com>2016-02-02 18:25:21 +0100
commitdb97ed9f91119bffa68e9d23acf1a08a8cd4e23c (patch)
treea9034d450380bd84e89eed2c8cc171d779f6a5a2
parenta7ad0b91e7dace173ed95f31b221628d50c175e8 (diff)
downloadhaskell-db97ed9f91119bffa68e9d23acf1a08a8cd4e23c.tar.gz
Add (failing) test for #11247
-rw-r--r--testsuite/tests/runghc/Makefile12
-rw-r--r--testsuite/tests/runghc/T11247-hs.hs1
-rw-r--r--testsuite/tests/runghc/T11247-lhs.lhs1
-rw-r--r--testsuite/tests/runghc/T11247-no-extension1
-rw-r--r--testsuite/tests/runghc/T11247.stderr2
-rw-r--r--testsuite/tests/runghc/T11247.stdout5
-rw-r--r--testsuite/tests/runghc/all.T3
7 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/tests/runghc/Makefile b/testsuite/tests/runghc/Makefile
index f96c8297bd..c414f84ed4 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 0000000000..d88fc3cb2b
--- /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 0000000000..307f328063
--- /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 0000000000..4248384dd5
--- /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 0000000000..1c80dee60a
--- /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 0000000000..4e76a85631
--- /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 3ffaa20cbc..0403fbcf68 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'])