Follow-up to #13887, for promoted infix constructors
[ghc.git] / testsuite / tests / th / all.T
index f05a634..29a6334 100644 (file)
@@ -14,6 +14,7 @@ if config.have_ext_interp :
        setTestOpts(only_ways(['normal','ghci','ext-interp']))
 
 test('TH_mkName', normal, compile, ['-v0'])
+test('TH_overloadedlabels', normal, compile, ['-v0'])
 test('TH_1tuple', normal, compile_fail, ['-v0'])
 
 test('TH_repE2', normal, compile_and_run, [''])
@@ -63,6 +64,14 @@ test('TH_reifyDecl2', normal, compile, ['-v0'])
 test('TH_reifyLocalDefs', normal, compile, ['-v0'])
 test('TH_reifyLocalDefs2', normal, compile, ['-v0'])
 
+
+# Checks if the error output of an appended command has the given pattern.
+def error_has(pattern):
+    swap12 = '3>&1 1>&2 2>&3 3>&-' # Swap file descriptors 1 and 2.
+    # pipefail: make a pipe fail if any of the commands fails
+    # the following fails only if both the command fails and the pattern is found
+    return('bash -o pipefail -c \'! (! "$@" {swap12}) | grep {pattern} {swap12} &> /dev/null\' --'.format(**locals()))
+
 test('TH_reifyMkName', normal, compile, ['-v0'])
 
 test('TH_reifyInstances', normal, compile, ['-v0'])
@@ -239,7 +248,7 @@ test('TH_Roles2', normalise_version('array', 'base', 'deepseq', 'ghc-prim',
                                     'ghc-boot', 'ghc-boot-th',
                                     'integer-gmp', 'pretty', 'template-haskell',
                                     'binary', 'bytestring', 'containers'
-                                    ), compile, ['-v0 -ddump-tc'])
+                                    ), compile, ['-v0 -ddump-tc -dsuppress-uniques'])
 test('TH_Roles3', normal, compile, ['-v0 -dsuppress-uniques'])
 test('TH_Roles4', normal, compile, ['-v0'])
 
@@ -360,6 +369,7 @@ test('T12478_2', omit_ways(['ghci']), compile_and_run, ['-v0'])
 test('T12478_3', omit_ways(['ghci']), compile, ['-v0'])
 test('T12478_4', omit_ways(['ghci']), compile_fail, ['-v0'])
 test('T12478_5', omit_ways(['ghci']), compile, ['-v0'])
+test('T12503', normal, compile, ['-v0'])
 test('T12513', omit_ways(['ghci']), compile_fail, ['-v0'])
 test('T12530', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
 test('T12646', normal, compile, ['-v0'])
@@ -371,3 +381,15 @@ test('T13018', normal, compile, ['-v0'])
 test('T13123', normal, compile, ['-v0'])
 test('T13098', normal, compile, ['-v0'])
 test('T11046', normal, multimod_compile, ['T11046','-v0'])
+test('T13366', normal, compile_and_run, ['-lstdc++ -v0'])
+test('T13473', normal, multimod_compile_and_run,
+     ['T13473.hs', '-v0 ' + config.ghc_th_way_flags])
+test('T13587', expect_broken(13587), compile_and_run, ['-v0'])
+test('T13618', normal, compile_and_run, ['-v0'])
+test('T13642', normal, compile, ['-v0'])
+test('T13781', normal, compile, ['-v0'])
+test('T13782', normal, compile, [''])
+test('T13837', normal, compile_fail, ['-v0 -dsuppress-uniques'])
+test('T13856', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
+test('T13887', normal, compile_and_run, ['-v0'])
+test('T13968', normal, compile_fail, ['-v0'])