Tests for #8601
authorJohn Lenz <lenz@math.uic.edu>
Tue, 7 Jan 2014 13:22:56 +0000 (07:22 -0600)
committerAustin Seipp <austin@well-typed.com>
Tue, 7 Jan 2014 14:29:29 +0000 (08:29 -0600)
Signed-off-by: Austin Seipp <austin@well-typed.com>
testsuite/tests/runghc/Makefile
testsuite/tests/runghc/T8601.stdout [new file with mode: 0644]
testsuite/tests/runghc/all.T

index de374d5..f96c829 100644 (file)
@@ -5,3 +5,8 @@ include $(TOP)/mk/test.mk
 T7859:
        -'$(RUNGHC)' -fdefer-type-errors T7859.hs
 
+#The bug is that when reading from standard input, --ghc-arg= did not work correctly.
+#In the buggy version, the following command would try and use mtl as a source file to
+#compile.
+T8601:
+       -echo 'main = putStrLn "Hello World!"' | '$(RUNGHC)' -f '$(TEST_HC)' -hide-package --ghc-arg=bytestring
diff --git a/testsuite/tests/runghc/T8601.stdout b/testsuite/tests/runghc/T8601.stdout
new file mode 100644 (file)
index 0000000..980a0d5
--- /dev/null
@@ -0,0 +1 @@
+Hello World!
index e7a5612..d268f2e 100644 (file)
@@ -4,3 +4,5 @@ setTestOpts(when(compiler_profiled(), skip))
 test('T7859', req_interp, run_command,
      ['$MAKE --no-print-directory -s T7859'])
 
+test('T8601', req_interp, run_command,
+     ['$MAKE --no-print-directory -s T8601'])