Commit ae6129e4 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Merge branch 'master' of http://darcs.haskell.org/testsuite

parents fda1f8ad cc4d1ffb
......@@ -1418,14 +1418,20 @@ def compare_outputs( kind, normaliser, extra_normaliser,
# Ignore whitespace when diffing. We should only get to this
# point if there are non-whitespace differences
r = os.system( 'diff -uw ' + expected_normalised_file + \
' ' + actual_normalised_file )
#
# Note we are diffing the *actual* output, not the normalised
# output. The normalised output may have whitespace squashed
# (including newlines) so the diff would be hard to read.
# This does mean that the diff might contain changes that
# would be normalised away.
r = os.system( 'diff -uw ' + expected_file + \
' ' + actual_file )
# If for some reason there were no non-whitespace differences,
# then do a full diff
if r == 0:
r = os.system( 'diff -u ' + expected_normalised_file + \
' ' + actual_normalised_file )
r = os.system( 'diff -u ' + expected_file + \
' ' + actual_file )
if config.accept:
if expected_file == '':
......
......@@ -304,10 +304,10 @@ test('dynHelloWorld',
# simple test that we can load and use the GHC package in all ways
# (in #5313 it was failing the dyn way)
p = subprocess.Popen([config.compiler, "--print-libdir"], stdout=subprocess.PIPE)
libdir = p.stdout.read()
libdir = chop(p.stdout.read())
p.stdout.close
test('5313', extra_run_opts(libdir), compile_and_run, ['-package ghc'])
test('5313', extra_run_opts('"' + libdir + '"'), compile_and_run, ['-package ghc'])
test('2464', normal, compile, [''])
test('3674', ignore_output, run_command,
......
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Sub
main = print $x
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
# Recompilation tests
clean:
rm -f *.o *.hi
rm -f B.hs C
# bug #481
recomp009: clean
cp Sub1.hs Sub.hs
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make Main.hs
./Main
sleep 1
cp Sub2.hs Sub.hs
-'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make Main.hs
./Main
{-# LANGUAGE TemplateHaskell #-}
module Sub where
x = [| 1 |]
{-# LANGUAGE TemplateHaskell #-}
module Sub where
x = [| 2 |]
# Test for #481, a recompilation bug with Template Haskell
test('recomp009',
[ clean_cmd('$MAKE -s clean') ],
run_command,
['$MAKE -s --no-print-directory recomp009'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment