diff options
author | Kai Harries <kai.harries@gmail.com> | 2016-03-23 16:21:52 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-03-24 10:53:27 +0100 |
commit | 9f9345e5ad55e4a02e6de9afac814ac58c852ff2 (patch) | |
tree | 420686d08fa4f4be46ea5bb4439142707079d001 /testsuite/tests/driver | |
parent | 6c2c853b11fe25c106469da7b105e2be596c17de (diff) | |
download | haskell-9f9345e5ad55e4a02e6de9afac814ac58c852ff2.tar.gz |
Create empty dump files (fixes #10320)
Test Plan: ./validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2015
GHC Trac Issues: #10320
Diffstat (limited to 'testsuite/tests/driver')
-rw-r--r-- | testsuite/tests/driver/Makefile | 8 | ||||
-rw-r--r-- | testsuite/tests/driver/T10320.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/driver/all.T | 5 |
3 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile index 50696a7052..8c986817b0 100644 --- a/testsuite/tests/driver/Makefile +++ b/testsuite/tests/driver/Makefile @@ -609,3 +609,11 @@ T10182: "$(TEST_HC)" $(TEST_HC_OPTS) -c T10182.hs-boot "$(TEST_HC)" $(TEST_HC_OPTS) -c T10182a.hs "$(TEST_HC)" $(TEST_HC_OPTS) -c T10182.hs + +.PHONY: T10320 +T10320: + $(RM) -rf T10320 T10320.dump-rule-rewrites T10320.hi T10320.o + "$(TEST_HC)" $(TEST_HC_OPTS) -ddump-to-file -ddump-rule-rewrites -fenable-rewrite-rules T10320.hs + [ -s T10320.dump-rule-rewrites ] + "$(TEST_HC)" $(TEST_HC_OPTS) -ddump-to-file -ddump-rule-rewrites T10320.hs + [ -f T10320.dump-rule-rewrites ] && [ ! -s T10320.dump-rule-rewrites ] diff --git a/testsuite/tests/driver/T10320.hs b/testsuite/tests/driver/T10320.hs new file mode 100644 index 0000000000..f2f613ce66 --- /dev/null +++ b/testsuite/tests/driver/T10320.hs @@ -0,0 +1,8 @@ +-- | Test file for issue #10320. + +module Main (main) where + +main :: IO () +main = print $ map (+1) (map (+1) [1, 2, 3]) + +{-# RULES "map/map" forall f g xs. map f (map g xs) = map (f.g) xs #-} diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T index e52eae398b..ae75823f0b 100644 --- a/testsuite/tests/driver/all.T +++ b/testsuite/tests/driver/all.T @@ -472,3 +472,8 @@ test('T11429a', normal, compile, ['-Wunrecognised-warning-flags -Wfoobar']) test('T11429b', normal, compile, ['-Wno-unrecognised-warning-flags -Wfoobar']) test('T11429c', normal, compile_fail, ['-Wunrecognised-warning-flags -Werror -Wfoobar']) +test('T10320', + [ ignore_output + , extra_clean(['T10320', 'T10320.o', 'T10320.hi'])], + run_command, + ['$MAKE -s --no-print-directory T10320']) |