blob: 40ba561f6937bbddeffe60d563699fa26b213be5 (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
ghci024:
@echo "~~~~~~~~~~ Testing :set"
printf ":set\n" \
| '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE)
@echo "~~~~~~~~~~ Testing :set -a"
printf ":set -a\n" \
| '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) \
| grep -E "^([^ ]| -fno-print-explicit-foralls| -Wno-implicit-prelude)"
@echo "~~~~~~~~~~ Testing :show languages"
printf ":show languages\n" \
| '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE)
@echo "~~~~~~~~~~ Testing :show languages, with -XMagicHash"
printf ":set -XMagicHash\n:show languages\n" \
| '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE)
@echo "~~~~~~~~~~ Testing :show packages"
printf ":show packages\n" \
| '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) \
| grep -E "^([^ ]| -package|base|ghc-prim|integer|rts|Cabal)" \
| sed "s/Cabal-[0-9.]*/Cabal-VERSION/"
@echo "~~~~~~~~~~ Testing :show packages, including the ghc package"
printf ":set -package ghc\n:show packages\n" \
| '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) \
| grep -E "^([^ ]| -package|base|ghc-prim|integer|rts|Cabal)" \
| sed "s/Cabal-[0-9.]*/Cabal-VERSION/"
.PHONY: ghci037
ghci037:
'$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) < ghci037.script
'$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -fno-ghci-sandbox < ghci037.script
ghci056_setup:
'$(TEST_HC)' $(TEST_HC_OPTS) -c ghci056_c.c
.PHONY: T6106_prep
T6106_prep:
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make T6106_preproc
.PHONY: T9367
T9367:
'$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) < T9367.script > T9367-raw.run.stdout
cmp T9367-raw.run.stdout T9367-raw.stdout
.PHONY: T9762_prep
T9762_prep:
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -O -fhpc -dynamic T9762B.hs
.PHONY: T10408
T10408:
# `-ghci-script`s should be executed in the order they are specified,
# and not be ignored when `-ignore-dot-ghci` is specified.
'$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) \
-ghci-script T10408A.script -ghci-script T10408B.script < /dev/null
.PHONY: T11389
T11389:
# Test that "Loaded GHCi configuration" message is printed by default
# (without -v0)
'$(TEST_HC)' $(filter-out -v0,$(TEST_HC_OPTS_INTERACTIVE)) \
-ghci-script T11389.script < /dev/null | grep 'configuration'
.PHONY: T12023
T12023:
-'$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) \
-ghci-script T12023.script < /dev/null | grep -c -E '(~#|~R#|~P#)'
|