diff options
author | David Terei <davidterei@gmail.com> | 2011-07-20 11:09:03 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-07-20 11:26:35 -0700 |
commit | 16514f272fb42af6e9c7674a9bd6c9dce369231f (patch) | |
tree | e4f332b45fe65e2a7a2451be5674f887b42bf199 /testsuite/tests/hsc2hs | |
parent | ebd422aed41048476aa61dd4c520d43becd78682 (diff) | |
download | haskell-16514f272fb42af6e9c7674a9bd6c9dce369231f.tar.gz |
Move tests from tests/ghc-regress/* to just tests/*
Diffstat (limited to 'testsuite/tests/hsc2hs')
-rw-r--r-- | testsuite/tests/hsc2hs/3837.hsc | 7 | ||||
-rw-r--r-- | testsuite/tests/hsc2hs/Makefile | 16 | ||||
-rw-r--r-- | testsuite/tests/hsc2hs/all.T | 20 | ||||
-rw-r--r-- | testsuite/tests/hsc2hs/hsc2hs001.hsc | 6 | ||||
-rw-r--r-- | testsuite/tests/hsc2hs/hsc2hs002.hsc | 6 |
5 files changed, 55 insertions, 0 deletions
diff --git a/testsuite/tests/hsc2hs/3837.hsc b/testsuite/tests/hsc2hs/3837.hsc new file mode 100644 index 0000000000..7f8ee255af --- /dev/null +++ b/testsuite/tests/hsc2hs/3837.hsc @@ -0,0 +1,7 @@ +-- Test that UTF-8 is passed through correctly by hsc2hs + +#define uni Ⴀ + +#let name = "αβγ" + +main = let (#name) = 3 in print (#name) diff --git a/testsuite/tests/hsc2hs/Makefile b/testsuite/tests/hsc2hs/Makefile new file mode 100644 index 0000000000..0b904f317c --- /dev/null +++ b/testsuite/tests/hsc2hs/Makefile @@ -0,0 +1,16 @@ +TOP=../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +ALL_TESTS = hsc2hs001 hsc2hs002 + +.PHONY: $(TESTS) + +$(ALL_TESTS): + '$(HSC2HS)' $@.hsc + '$(TEST_HC)' $(TEST_HC_OPTS) -c $@.hs + +.PHONY: 3837 +3837: + LANG=C '$(HSC2HS)' $@.hsc + '$(TEST_HC)' $(TEST_HC_OPTS) -c $@.hs diff --git a/testsuite/tests/hsc2hs/all.T b/testsuite/tests/hsc2hs/all.T new file mode 100644 index 0000000000..32900434d2 --- /dev/null +++ b/testsuite/tests/hsc2hs/all.T @@ -0,0 +1,20 @@ + +test('hsc2hs001', + [extra_clean(['hsc2hs001.hs', 'hsc2hs001_hsc_make.c']), + if_platform('i386-unknown-mingw32', expect_broken(3929))], + run_command, + ['$MAKE -s --no-print-directory hsc2hs001']) + +test('hsc2hs002', + [extra_clean(['hsc2hs002.hs', 'hsc2hs002_hsc_make.c']), + if_platform('i386-unknown-mingw32', expect_broken(3929))], + run_command, + ['$MAKE -s --no-print-directory hsc2hs002']) + + +test('3837', + [extra_clean(['3837.hs', '3837_hsc_make.c']), + if_platform('i386-unknown-mingw32', expect_broken(3929))], + run_command, + ['$MAKE -s --no-print-directory 3837']) + diff --git a/testsuite/tests/hsc2hs/hsc2hs001.hsc b/testsuite/tests/hsc2hs/hsc2hs001.hsc new file mode 100644 index 0000000000..4a47501859 --- /dev/null +++ b/testsuite/tests/hsc2hs/hsc2hs001.hsc @@ -0,0 +1,6 @@ + +module Main (main) where + +main :: IO () +main = print #size int + diff --git a/testsuite/tests/hsc2hs/hsc2hs002.hsc b/testsuite/tests/hsc2hs/hsc2hs002.hsc new file mode 100644 index 0000000000..14cee92358 --- /dev/null +++ b/testsuite/tests/hsc2hs/hsc2hs002.hsc @@ -0,0 +1,6 @@ + +module Main (main) where + +main :: IO () +main = print #size struct {int ab,cd;} + |