diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-06-23 11:53:57 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-06-25 05:19:53 -0400 |
commit | eb39981aa22f9a9e827c53103b813842928e5883 (patch) | |
tree | 7bcd69c90bd9a08d53c21b02555c3b4ba436b068 /testsuite/tests/driver | |
parent | f43a11d77720bfa38345f8d76938ec4ac34ec0b2 (diff) | |
download | haskell-eb39981aa22f9a9e827c53103b813842928e5883.tar.gz |
driver: Add test for T14923
Diffstat (limited to 'testsuite/tests/driver')
-rw-r--r-- | testsuite/tests/driver/Makefile | 20 | ||||
-rw-r--r-- | testsuite/tests/driver/T14923.stdout | 6 | ||||
-rw-r--r-- | testsuite/tests/driver/all.T | 1 |
3 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile index b097ab6c96..9f7716a4fe 100644 --- a/testsuite/tests/driver/Makefile +++ b/testsuite/tests/driver/Makefile @@ -706,3 +706,23 @@ T17481: touch Main.hs echo "Compiling and running Main.hs:" "$(TEST_HC)" $(TEST_HC_OPTS) Main.hs && ./Main + +T14923: + echo "{-# LANGUAGE UndecidableInstances #-}" > Foo.hs + echo "module Foo where" >> Foo.hs + + cat Foo.hs + + "$(TEST_HC)" $(TEST_HC_OPTS) -c Foo.hs; + + sed -i 's/^{-\#/--&/' Foo.hs # comment out the pragma + + # Check sed actually worked + cat Foo.hs + + # This should recompile + "$(TEST_HC)" $(TEST_HC_OPTS) -c Foo.hs; + # This should not + "$(TEST_HC)" $(TEST_HC_OPTS) -c Foo.hs; + # And this should not + "$(TEST_HC)" $(TEST_HC_OPTS) -c Foo.hs; diff --git a/testsuite/tests/driver/T14923.stdout b/testsuite/tests/driver/T14923.stdout new file mode 100644 index 0000000000..0303eb08ee --- /dev/null +++ b/testsuite/tests/driver/T14923.stdout @@ -0,0 +1,6 @@ +{-# LANGUAGE UndecidableInstances #-} +module Foo where +--{-# LANGUAGE UndecidableInstances #-} +module Foo where +compilation IS NOT required +compilation IS NOT required diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T index 6fa78378ce..2afd735fe0 100644 --- a/testsuite/tests/driver/all.T +++ b/testsuite/tests/driver/all.T @@ -278,6 +278,7 @@ test('inline-check', omit_ways(['hpc', 'profasm']) , ['-dinline-check foo -O -ddebug-output']) test('T14452', [], makefile_test, []) +test('T14923', normal, makefile_test, []) test('T15396', normal, compile_and_run, ['-package ghc']) test('T16737', [extra_files(['T16737include/']), |