summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/IO/Makefile
blob: 6808f5f868887b49402190704ef62d672f5da9dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk

test.concio001:
	$(TEST_HC) $(TEST_HC_OPTS) --make -fforce-recomp -v0 concio001 -o concio001 
	(sleep 1; echo x) | ./concio001

test.concio001.thr:
	$(TEST_HC) $(TEST_HC_OPTS) --make -fforce-recomp -v0 -threaded concio001 -o concio001 
	(sleep 1; echo x) | ./concio001

# NB. utf8-test should *not* have a final newline.  The last char should be 'X'.
utf16-test: utf8-test
	iconv -f UTF-8 -t UTF-16 <utf8-test >utf16-test

utf16le-test: utf8-test
	iconv -f UTF-8 -t UTF-16LE <utf8-test >utf16le-test

utf16be-test: utf8-test
	iconv -f UTF-8 -t UTF-16BE <utf8-test >utf16be-test

utf32-test: utf8-test
	iconv -f UTF-8 -t UTF-32 <utf8-test >utf32-test

utf32le-test: utf8-test
	iconv -f UTF-8 -t UTF-32LE <utf8-test >utf32le-test

utf32be-test: utf8-test
	iconv -f UTF-8 -t UTF-32BE <utf8-test >utf32be-test

utf8-bom-test: utf16-test
	iconv -f UTF-16LE -t UTF-8 <utf16-test >utf8-bom-test

hSetEncoding001.in : latin1 utf8-test utf16le-test utf16be-test utf16-test utf32le-test utf32be-test utf32-test utf8-bom-test
	cat >$@ latin1 utf8-test utf16le-test utf16be-test utf16-test utf32-test utf32le-test utf32be-test utf8-bom-test

environment001-test:
	"$(TEST_HC)" --make -fforce-recomp -v0 environment001.hs -o environment001 
	GHC_TEST=马克斯 ./environment001 说

3307-test:
	"$(TEST_HC)" --make -fforce-recomp -v0 3307.hs -o 3307
	echo Ni hao > chinese-file-小说
	echo chinese-file-小说 > chinese-name
	# The tests are run in whatever the default locale is. This is almost always UTF-8,
	# but in cmd on Windows it will be the non-Unicode CP850 locale.
	./3307 chinese-file-小说