diff options
author | roland <rsx@bluewin.ch> | 2018-08-21 12:18:26 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-08-21 18:52:42 -0400 |
commit | ebcbfba7bbf07fa9fbb78b46951892997795bcb8 (patch) | |
tree | e86c442edbcc6403bb7a2bf85c12b889f941ef39 /testsuite/tests | |
parent | 23774c98f1368b41515cbd5223b87ea6dbf644e1 (diff) | |
download | haskell-ebcbfba7bbf07fa9fbb78b46951892997795bcb8.tar.gz |
Introduce flag -keep-hscpp-files
Test Plan: `make test=T10869`
Reviewers: mpickering, thomie, ezyang, bgamari
Reviewed By: thomie, bgamari
Subscribers: rwbarton, carter
GHC Trac Issues: #10869
Differential Revision: https://phabricator.haskell.org/D4861
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/driver/Makefile | 8 | ||||
-rw-r--r-- | testsuite/tests/driver/T10869.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/driver/T10869A.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/driver/all.T | 2 |
4 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile index 727cc44940..540f158b14 100644 --- a/testsuite/tests/driver/Makefile +++ b/testsuite/tests/driver/Makefile @@ -619,6 +619,14 @@ T10320: "$(TEST_HC)" $(TEST_HC_OPTS) -v0 -fforce-recomp -ddump-to-file -ddump-rule-rewrites T10320.hs [ -f T10320.dump-rule-rewrites ] && [ ! -s T10320.dump-rule-rewrites ] +.PHONY: T10869 +T10869: + $(RM) -rf T10869.hi T10869.o T10869.hspp T10869 + $(RM) -rf T10869A.hi T10869A.o T10869A.hspp + "$(TEST_HC)" $(TEST_HC_OPTS) -c -keep-hscpp-files T10869A.hs T10869.hs + test -f T10869.hscpp + test -f T10869A.hscpp + .PHONY: T12135 T12135: $(RM) -rf T12135.o T12135.hi T12135 T12135a T12135b diff --git a/testsuite/tests/driver/T10869.hs b/testsuite/tests/driver/T10869.hs new file mode 100644 index 0000000000..e1518544b2 --- /dev/null +++ b/testsuite/tests/driver/T10869.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE CPP #-} + +module T10869 where +import T10869A + +main :: IO() +#if defined(__GLASGOW_HASKELL__) +main = writeMsg +#endif diff --git a/testsuite/tests/driver/T10869A.hs b/testsuite/tests/driver/T10869A.hs new file mode 100644 index 0000000000..14e57772c7 --- /dev/null +++ b/testsuite/tests/driver/T10869A.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE CPP #-} +module T10869A (writeMsg) where + +writeMsg :: IO () +#if defined(__GLASGOW_HASKELL__) +writeMsg = putStrLn "Hello HSPP File" +#endif diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T index 07dc3bf916..be91a261d8 100644 --- a/testsuite/tests/driver/all.T +++ b/testsuite/tests/driver/all.T @@ -234,6 +234,8 @@ test('T10220', normal, run_command, test('T10182', [], run_command, ['$MAKE -s --no-print-directory T10182']) +test('T10869', [], run_command, ['$MAKE -s --no-print-directory T10869']) + test('T365', [pre_cmd('touch test_preprocessor.txt'), unless(opsys('mingw32'), skip)], compile_fail, ['']) |