Index: src/tests/test.py
===================================================================
--- src/tests/test.py	(revision 2e04c7b34464d3612a7e206e39155abe12014238)
+++ src/tests/test.py	(revision 472ca323a0ab4c621c6d48180c6ada0ee286ce07)
@@ -21,12 +21,12 @@
 	return list
 
-def sh(cmd, dry_run):
+def sh(cmd, dry_run = False, print2stdout = True):
 	if dry_run :
 		print("cmd: %s" % cmd)
-		return 0
+		return 0, None
 	else :
-		proc = Popen(cmd, stderr=STDOUT, shell=True)
-		proc.communicate()
-		return proc.returncode
+		proc = Popen(cmd, stdout=None if print2stdout else PIPE, stderr=STDOUT, shell=True)
+		out, err = proc.communicate()
+		return proc.returncode, out
 
 def file_replace(fname, pat, s_after):
@@ -61,5 +61,5 @@
 
 	# build, skipping to next test on error
-	make_ret = sh("%s %s 2> %s 1> /dev/null" % (make_cmd, test, out_file), dry_run)
+	make_ret, _ = sh("%s %s 2> %s 1> /dev/null" % (make_cmd, test, out_file), dry_run)
 
 	if make_ret == 0 :
@@ -71,4 +71,5 @@
 
 	retcode = 0
+	error = None
 
 	fix_MakeLevel(out_file)
@@ -76,10 +77,24 @@
 	if not generate :
 		# diff the output of the files
-		retcode = sh("diff .expect/%s.txt .out/%s.log" % (test, test), dry_run)
+		diff_cmd = ("diff --old-group-format='\t\tmissing lines :\n"
+					"%%<' \\\n"
+					"--new-group-format='\t\tnew lines :\n"
+					"%%>' \\\n"
+					"--unchanged-group-format='%%=' \\"
+					"--changed-group-format='\t\texpected :\n"
+					"%%<\n"
+					"\t\tgot :\n"
+					"%%>' \\\n"
+					"--new-line-format='\t\t%%dn\t%%L' \\\n"
+					"--old-line-format='\t\t%%dn\t%%L' \\\n"
+					"--unchanged-line-format='' \\\n"
+					".expect/%s.txt .out/%s.log")
+
+		retcode, error = sh(diff_cmd % (test, test), dry_run, False)
 
 	# clean the executable
 	sh("rm -f %s > /dev/null 2>&1" % test, dry_run)
 
-	return retcode
+	return retcode, error
 
 def run_tests(tests, generate, dry_run) :
@@ -94,9 +109,11 @@
 		print("%20s  " % t, end="")
 		sys.stdout.flush()
-		test_failed = run_test_instance(t, generate, dry_run)
+		test_failed, error = run_test_instance(t, generate, dry_run)
 		failed = test_failed or failed
 
 		if not generate :
 			print("FAILED" if test_failed else "PASSED")
+			if error :
+				print(error)
 		else :
 			print( "Done" )
