Index: tests/pybin/tools.py
===================================================================
--- tests/pybin/tools.py	(revision 40c81e595a63a7b8ce59b620f299ea662356269c)
+++ tests/pybin/tools.py	(revision f866d1533865d0b4f018bbcd150815363407ee0e)
@@ -88,22 +88,34 @@
 		raise
 
+def is_empty(fname):
+	if not os.path.isfile(fname):
+		return True
+
+	if os.stat(fname).st_size == 0:
+		return True
+
+	return False
+
 def is_ascii(fname):
 	if settings.dry_run:
 		print("is_ascii: %s" % fname)
-		return True
+		return (True, "")
 
 	if not os.path.isfile(fname):
-		return False
-
-	code, out = sh("file %s" % fname, output_file=subprocess.PIPE)
+		return (False, "No file")
+
+	code, out = sh("file", fname, output_file=subprocess.PIPE)
 	if code != 0:
-		return False
+		return (False, "'file EXPECT' failed with code {}".format(code))
 
 	match = re.search(".*: (.*)", out)
 
 	if not match:
-		return False
-
-	return match.group(1).startswith("ASCII text")
+		return (False, "Unreadable file type: '{}'".format(out))
+
+	if "ASCII text" in match.group(1):
+		return (True, "")
+
+	return (False, "File type should be 'ASCII text', was '{}'".format(match.group(1)))
 
 def is_exe(fname):
Index: tests/test.py
===================================================================
--- tests/test.py	(revision 40c81e595a63a7b8ce59b620f299ea662356269c)
+++ tests/test.py	(revision f866d1533865d0b4f018bbcd150815363407ee0e)
@@ -366,4 +366,10 @@
 		failed = 0
 
+		# check if the expected files aren't empty
+		if not options.regenerate_expected:
+			for t in tests:
+				if is_empty(t.expect()):
+					print('WARNING: test "{}" has empty .expect file'.format(t.target()), file=sys.stderr)
+
 		# for each build configurations, run the test
 		with Timed() as total_dur:
