diff options
-rw-r--r-- | testsuite/tests/driver/T18733/Library1.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/driver/T18733/Library2.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/driver/T18733/Main.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/driver/T18733/Makefile | 12 | ||||
-rw-r--r-- | testsuite/tests/driver/T18733/T18733.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/driver/T18733/all.T | 2 |
6 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/tests/driver/T18733/Library1.hs b/testsuite/tests/driver/T18733/Library1.hs new file mode 100644 index 0000000000..a05015ed1f --- /dev/null +++ b/testsuite/tests/driver/T18733/Library1.hs @@ -0,0 +1,7 @@ +module Library where + +data A = ARecu B | ABase String deriving (Show) +data B = BRecu A | BBase Int deriving (Show) + +info :: B +info = BBase 1 diff --git a/testsuite/tests/driver/T18733/Library2.hs b/testsuite/tests/driver/T18733/Library2.hs new file mode 100644 index 0000000000..bd0283dd0f --- /dev/null +++ b/testsuite/tests/driver/T18733/Library2.hs @@ -0,0 +1,7 @@ +module Library where + +data A = ARecu B | ABase String deriving (Show) +data B = BRecu A | BBase Int deriving (Show) + +info :: A +info = ABase "Hello" diff --git a/testsuite/tests/driver/T18733/Main.hs b/testsuite/tests/driver/T18733/Main.hs new file mode 100644 index 0000000000..6a09b6d4e4 --- /dev/null +++ b/testsuite/tests/driver/T18733/Main.hs @@ -0,0 +1,5 @@ +module Main where + +import Library + +main = putStrLn $ show info diff --git a/testsuite/tests/driver/T18733/Makefile b/testsuite/tests/driver/T18733/Makefile new file mode 100644 index 0000000000..457b23a09f --- /dev/null +++ b/testsuite/tests/driver/T18733/Makefile @@ -0,0 +1,12 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +T18733: + cp Library1.hs Library.hs + '$(TEST_HC)' -v0 -o Main Library.hs Main.hs + ./Main + + cp Library2.hs Library.hs + '$(TEST_HC)' -v0 -o Main Library.hs Main.hs + ./Main diff --git a/testsuite/tests/driver/T18733/T18733.stdout b/testsuite/tests/driver/T18733/T18733.stdout new file mode 100644 index 0000000000..aa6c9f761e --- /dev/null +++ b/testsuite/tests/driver/T18733/T18733.stdout @@ -0,0 +1,2 @@ +BBase 1 +ABase "Hello" diff --git a/testsuite/tests/driver/T18733/all.T b/testsuite/tests/driver/T18733/all.T new file mode 100644 index 0000000000..233563b1ce --- /dev/null +++ b/testsuite/tests/driver/T18733/all.T @@ -0,0 +1,2 @@ +srcs = ['Library1.hs', 'Library2.hs', 'Main.hs'] +test('T18733', extra_files(srcs), makefile_test, []) |