summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-09-30 23:31:59 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-12 19:16:40 -0400
commit9257abebdf4904407f607814c4cfa27002d404e8 (patch)
treedfb4c8be51987bef4c4e22d533d4b74fedbca854 /testsuite/tests/ghci
parent683011c7be9861d316a14ffb458341b8db68df34 (diff)
downloadhaskell-9257abebdf4904407f607814c4cfa27002d404e8.tar.gz
testsuite: Drop :set from ghci scripts
The ghci scripts for T9293 and ghci057 used `:set` to print the currently-set options. However, in neither case was this necessary to the correctness of the test and moreover it would introduce spurious platform-dependence (e.g. since `-fexternal-dynamic-refs` is set by default only on platforms that support dynamic linking).
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r--testsuite/tests/ghci/scripts/T9293.script4
-rw-r--r--testsuite/tests/ghci/scripts/T9293.stderr2
-rw-r--r--testsuite/tests/ghci/scripts/T9293.stdout76
-rw-r--r--testsuite/tests/ghci/scripts/T9293.stdout-mingw3277
-rw-r--r--testsuite/tests/ghci/scripts/ghci057.script4
-rw-r--r--testsuite/tests/ghci/scripts/ghci057.stderr2
-rw-r--r--testsuite/tests/ghci/scripts/ghci057.stdout76
-rw-r--r--testsuite/tests/ghci/scripts/ghci057.stdout-mingw3277
8 files changed, 2 insertions, 316 deletions
diff --git a/testsuite/tests/ghci/scripts/T9293.script b/testsuite/tests/ghci/scripts/T9293.script
index c4719e26e4..ed0b8b0a75 100644
--- a/testsuite/tests/ghci/scripts/T9293.script
+++ b/testsuite/tests/ghci/scripts/T9293.script
@@ -1,23 +1,19 @@
:set -XHaskell2010
-:set
putStrLn "Should fail, GADTs is not enabled"
data T a where C :: T Int
:set -XGADTs
-:set
putStrLn "Should work, GADTs is in force from :set"
:load ghci057.hs
:unset -XGADTs
-:set
putStrLn "Should fail, GADTs is now disabled"
:load ghci057.hs
:seti -XGADTs
-:seti
putStrLn "Should fail, GADTs is only enabled at the prompt"
:load ghci057.hs
diff --git a/testsuite/tests/ghci/scripts/T9293.stderr b/testsuite/tests/ghci/scripts/T9293.stderr
index 8f46cee2d1..93925a5443 100644
--- a/testsuite/tests/ghci/scripts/T9293.stderr
+++ b/testsuite/tests/ghci/scripts/T9293.stderr
@@ -1,5 +1,5 @@
-<interactive>:5:1: error:
+<interactive>:4:1: error:
• Illegal generalised algebraic data declaration for ‘T’
(Enable the GADTs extension to allow this)
• In the data declaration for ‘T’
diff --git a/testsuite/tests/ghci/scripts/T9293.stdout b/testsuite/tests/ghci/scripts/T9293.stdout
index 70803c3f14..e4843ec2a9 100644
--- a/testsuite/tests/ghci/scripts/T9293.stdout
+++ b/testsuite/tests/ghci/scripts/T9293.stdout
@@ -1,81 +1,5 @@
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fexternal-dynamic-refs
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
Should fail, GADTs is not enabled
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
- -XGADTSyntax
- -XGADTs
- -XMonoLocalBinds
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fexternal-dynamic-refs
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
Should work, GADTs is in force from :set
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
- -XGADTSyntax
- -XMonoLocalBinds
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fexternal-dynamic-refs
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
Should fail, GADTs is now disabled
-base language is: Haskell2010
-with the following modifiers:
- -XExtendedDefaultRules
- -XGADTSyntax
- -XGADTs
- -XMonoLocalBinds
- -XNoMonomorphismRestriction
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fexternal-dynamic-refs
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
Should fail, GADTs is only enabled at the prompt
C :: T Int
diff --git a/testsuite/tests/ghci/scripts/T9293.stdout-mingw32 b/testsuite/tests/ghci/scripts/T9293.stdout-mingw32
deleted file mode 100644
index 0fa4660e33..0000000000
--- a/testsuite/tests/ghci/scripts/T9293.stdout-mingw32
+++ /dev/null
@@ -1,77 +0,0 @@
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
-Should fail, GADTs is not enabled
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
- -XGADTSyntax
- -XGADTs
- -XMonoLocalBinds
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
-Should work, GADTs is in force from :set
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
- -XGADTSyntax
- -XMonoLocalBinds
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
-Should fail, GADTs is now disabled
-base language is: Haskell2010
-with the following modifiers:
- -XExtendedDefaultRules
- -XGADTSyntax
- -XGADTs
- -XMonoLocalBinds
- -XNoMonomorphismRestriction
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
-Should fail, GADTs is only enabled at the prompt
-C :: T Int
diff --git a/testsuite/tests/ghci/scripts/ghci057.script b/testsuite/tests/ghci/scripts/ghci057.script
index db77b80cb1..937c602558 100644
--- a/testsuite/tests/ghci/scripts/ghci057.script
+++ b/testsuite/tests/ghci/scripts/ghci057.script
@@ -1,23 +1,19 @@
:set -XHaskell2010
-:set
putStrLn "Should fail, GADTs is not enabled"
data T a where C :: T Int
:set -XGADTs
-:set
putStrLn "Should work, GADTs is in force from :set"
:load ghci057.hs
:set -XNoGADTs
-:set
putStrLn "Should fail, GADTs is now disabled"
:load ghci057.hs
:seti -XGADTs
-:seti
putStrLn "Should fail, GADTs is only enabled at the prompt"
:load ghci057.hs
diff --git a/testsuite/tests/ghci/scripts/ghci057.stderr b/testsuite/tests/ghci/scripts/ghci057.stderr
index 8f46cee2d1..93925a5443 100644
--- a/testsuite/tests/ghci/scripts/ghci057.stderr
+++ b/testsuite/tests/ghci/scripts/ghci057.stderr
@@ -1,5 +1,5 @@
-<interactive>:5:1: error:
+<interactive>:4:1: error:
• Illegal generalised algebraic data declaration for ‘T’
(Enable the GADTs extension to allow this)
• In the data declaration for ‘T’
diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout b/testsuite/tests/ghci/scripts/ghci057.stdout
index 70803c3f14..e4843ec2a9 100644
--- a/testsuite/tests/ghci/scripts/ghci057.stdout
+++ b/testsuite/tests/ghci/scripts/ghci057.stdout
@@ -1,81 +1,5 @@
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fexternal-dynamic-refs
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
Should fail, GADTs is not enabled
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
- -XGADTSyntax
- -XGADTs
- -XMonoLocalBinds
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fexternal-dynamic-refs
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
Should work, GADTs is in force from :set
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
- -XGADTSyntax
- -XMonoLocalBinds
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fexternal-dynamic-refs
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
Should fail, GADTs is now disabled
-base language is: Haskell2010
-with the following modifiers:
- -XExtendedDefaultRules
- -XGADTSyntax
- -XGADTs
- -XMonoLocalBinds
- -XNoMonomorphismRestriction
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fexternal-dynamic-refs
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
Should fail, GADTs is only enabled at the prompt
C :: T Int
diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 b/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32
deleted file mode 100644
index 0fa4660e33..0000000000
--- a/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32
+++ /dev/null
@@ -1,77 +0,0 @@
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
-Should fail, GADTs is not enabled
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
- -XGADTSyntax
- -XGADTs
- -XMonoLocalBinds
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
-Should work, GADTs is in force from :set
-options currently set: none.
-base language is: Haskell2010
-with the following modifiers:
- -XGADTSyntax
- -XMonoLocalBinds
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fkeep-going
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
-Should fail, GADTs is now disabled
-base language is: Haskell2010
-with the following modifiers:
- -XExtendedDefaultRules
- -XGADTSyntax
- -XGADTs
- -XMonoLocalBinds
- -XNoMonomorphismRestriction
-GHCi-specific dynamic flag settings:
-other dynamic, non-language, flag settings:
- -fno-diagnostics-show-caret
- -fignore-optim-changes
- -fignore-hpc-changes
- -fno-ghci-history
- -fimplicit-import-qualified
- -fshow-warning-groups
-warning settings:
- -Wsemigroup
- -Wstar-is-type
- -Wcompat-unqualified-imports
-Should fail, GADTs is only enabled at the prompt
-C :: T Int