diff options
author | Kari Pahula <kaol@iki.fi> | 2019-09-20 10:11:53 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-09-23 17:54:42 -0400 |
commit | 238b58e436a24fcb76846f24b37c90b873ef2bef (patch) | |
tree | c883f0952fa176f1b8355e2ce20b7788b30b5de7 /testsuite/tests | |
parent | d0c2f3a2b6ec2d3ee2b9f017eb52c72cf6187d6f (diff) | |
download | haskell-238b58e436a24fcb76846f24b37c90b873ef2bef.tar.gz |
Add -fkeep-going to make compiler continue despite errors (#15424)
Add a new optional failure handling for upsweep which continues
the compilation on other modules if any of them has errors.
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/ghci/prog019/A.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog019/B.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog019/B1.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog019/B2.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog019/C.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog019/D.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog019/E.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog019/prog019.T | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog019/prog019.script | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog019/prog019.stderr | 12 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog019/prog019.stdout | 2 |
11 files changed, 50 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/prog019/A.hs b/testsuite/tests/ghci/prog019/A.hs new file mode 100644 index 0000000000..4126fd03c3 --- /dev/null +++ b/testsuite/tests/ghci/prog019/A.hs @@ -0,0 +1,8 @@ +-- Test for #15424 + +module A where + +import B +import C +import D +import E diff --git a/testsuite/tests/ghci/prog019/B.hs b/testsuite/tests/ghci/prog019/B.hs new file mode 100644 index 0000000000..96a9cd4009 --- /dev/null +++ b/testsuite/tests/ghci/prog019/B.hs @@ -0,0 +1,3 @@ +module B where + +import B1 diff --git a/testsuite/tests/ghci/prog019/B1.hs b/testsuite/tests/ghci/prog019/B1.hs new file mode 100644 index 0000000000..093c3b3ab0 --- /dev/null +++ b/testsuite/tests/ghci/prog019/B1.hs @@ -0,0 +1,3 @@ +module B1 where + +import B2 diff --git a/testsuite/tests/ghci/prog019/B2.hs b/testsuite/tests/ghci/prog019/B2.hs new file mode 100644 index 0000000000..ad504c35ee --- /dev/null +++ b/testsuite/tests/ghci/prog019/B2.hs @@ -0,0 +1,3 @@ +module B2 where + +asdf diff --git a/testsuite/tests/ghci/prog019/C.hs b/testsuite/tests/ghci/prog019/C.hs new file mode 100644 index 0000000000..695cb14e18 --- /dev/null +++ b/testsuite/tests/ghci/prog019/C.hs @@ -0,0 +1,4 @@ +module C where + +foo :: Int +foo = 1 diff --git a/testsuite/tests/ghci/prog019/D.hs b/testsuite/tests/ghci/prog019/D.hs new file mode 100644 index 0000000000..4edf1e1f97 --- /dev/null +++ b/testsuite/tests/ghci/prog019/D.hs @@ -0,0 +1,3 @@ +module D where + +roses are red diff --git a/testsuite/tests/ghci/prog019/E.hs b/testsuite/tests/ghci/prog019/E.hs new file mode 100644 index 0000000000..114aeb9831 --- /dev/null +++ b/testsuite/tests/ghci/prog019/E.hs @@ -0,0 +1,4 @@ +module E where + +bar :: String +bar = "abc" diff --git a/testsuite/tests/ghci/prog019/prog019.T b/testsuite/tests/ghci/prog019/prog019.T new file mode 100644 index 0000000000..e5bc51f6ad --- /dev/null +++ b/testsuite/tests/ghci/prog019/prog019.T @@ -0,0 +1,4 @@ +test('prog019', + [extra_hc_opts('-fkeep-going'), + extra_files(['A.hs', 'B.hs', 'B1.hs', 'B2.hs', 'C.hs', 'D.hs', 'E.hs'])], + ghci_script, ['prog019.script']) diff --git a/testsuite/tests/ghci/prog019/prog019.script b/testsuite/tests/ghci/prog019/prog019.script new file mode 100644 index 0000000000..e4fcd34d4a --- /dev/null +++ b/testsuite/tests/ghci/prog019/prog019.script @@ -0,0 +1,4 @@ +:load A +bar +:module C +foo diff --git a/testsuite/tests/ghci/prog019/prog019.stderr b/testsuite/tests/ghci/prog019/prog019.stderr new file mode 100644 index 0000000000..b915e3d049 --- /dev/null +++ b/testsuite/tests/ghci/prog019/prog019.stderr @@ -0,0 +1,12 @@ + +B2.hs:3:1: error: + Parse error: module header, import declaration + or top-level declaration expected. +-fkeep-going in use, removing the following dependencies and continuing: + B1 + B + A + +D.hs:3:1: error: + Parse error: module header, import declaration + or top-level declaration expected. diff --git a/testsuite/tests/ghci/prog019/prog019.stdout b/testsuite/tests/ghci/prog019/prog019.stdout new file mode 100644 index 0000000000..64d63622e0 --- /dev/null +++ b/testsuite/tests/ghci/prog019/prog019.stdout @@ -0,0 +1,2 @@ +"abc" +1 |