diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/driver/Makefile | 10 | ||||
-rw-r--r-- | testsuite/tests/driver/T21349/A.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/driver/T21349/B.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/driver/T21349/Main.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/driver/all.T | 1 |
5 files changed, 24 insertions, 2 deletions
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile index b30c8a77cb..30ca61b8e5 100644 --- a/testsuite/tests/driver/Makefile +++ b/testsuite/tests/driver/Makefile @@ -755,11 +755,11 @@ T16476b: echo '-XCPP' >> unit-a echo '-DTEST' >> unit-a echo 'T16476b.hs' >> unit-a - + echo '--make' > resp echo '-unit' > resp echo '@unit-a' > resp - + "$(TEST_HC)" $(TEST_HC_OPTS) -v0 @resp ./T16476b @@ -767,3 +767,9 @@ T16476b: T20569: "$(TEST_HC)" $(TEST_HC_OPTS) -c T20569/A.hs -i -iT20569 -hidir=interface "$(TEST_HC)" $(TEST_HC_OPTS) -c T20569/B.hs -i -iT20569 -hidir=interface + +.PHONY: T21349 +T21349: + "$(TEST_HC)" $(TEST_HC_OPTS) -v0 Main -working-dir T21349 + [ ! -f T21349/B.o ] || (echo "object file exists" && exit 2) + [ ! -f T21349/B.hi ] || (echo "interface file exists" && exit 2) diff --git a/testsuite/tests/driver/T21349/A.hs b/testsuite/tests/driver/T21349/A.hs new file mode 100644 index 0000000000..bc9832431c --- /dev/null +++ b/testsuite/tests/driver/T21349/A.hs @@ -0,0 +1,5 @@ +module A where + +import B + +foo = b diff --git a/testsuite/tests/driver/T21349/B.hs b/testsuite/tests/driver/T21349/B.hs new file mode 100644 index 0000000000..30dbdafcc1 --- /dev/null +++ b/testsuite/tests/driver/T21349/B.hs @@ -0,0 +1,5 @@ +{-# OPTIONS_GHC -no-keep-hi-files #-} +{-# OPTIONS_GHC -no-keep-o-files #-} +module B where + +b = () diff --git a/testsuite/tests/driver/T21349/Main.hs b/testsuite/tests/driver/T21349/Main.hs new file mode 100644 index 0000000000..ce96eb7408 --- /dev/null +++ b/testsuite/tests/driver/T21349/Main.hs @@ -0,0 +1,5 @@ +module Main where + +import A + +main = print foo diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T index 35ee56dc52..3dc704a19d 100644 --- a/testsuite/tests/driver/all.T +++ b/testsuite/tests/driver/all.T @@ -307,3 +307,4 @@ test('patch-level2', normal, compile, ['-Wcpp-undef']) test('T16476a', normal, makefile_test, []) test('T16476b', normal, makefile_test, []) test('T20569', extra_files(["T20569/"]), makefile_test, []) +test('T21349', extra_files(['T21349']), makefile_test, []) |