]> git.saurik.com Git - bison.git/blobdiff - tests/synclines.at
Thank the developer of the initial push parser implementation.
[bison.git] / tests / synclines.at
index 8653b460e5b0d8895904b5ab749dc63db9f6d170..a3bc06d455bc50b0c0c774c902deadd3483624fc 100644 (file)
@@ -1,6 +1,6 @@
 # Executing Actions.                               -*- Autotest -*-
-# Copyright (C) 2002, 2004, 2005, 2007, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2004-2005, 2007, 2009-2010 Free Software
+# Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,26 @@ m4_define([AT_SYNCLINES_COMPILE],
 # =>
 #   input.y:4: #error "4"
 #
-AT_CHECK([[sed -e 's/^\([^:]*:[^:.]*\)[.:][^:]*:\(.*\)$/\1:\2/' -e 's/^\([^:]*:[^:]*:\)[^@%:@]*\( @%:@error\)/\1\2/' stderr]], 0, [stdout])
+# It may also issue more context information:
+#
+#   input.y: In function 'yyparse':
+#   input.y:8: #error "8"
+# =>
+#   input.y:4: #error "8"
+#
+#
+# And possibly distcc adds its bits.
+#
+#   distcc[33187] ERROR: compile (null) on localhost failed
+#   syncline.c:1:2: error: #error "1"
+#   distcc[33185] ERROR: compile syncline.c on localhost failed
+
+AT_CHECK([[sed -e '/^distcc\[[0-9]*\] ERROR: .*/d'                   \
+               -e 's/^\([^:]*:[^:.]*\)[.:][^:]*:\(.*\)$/\1:\2/'      \
+               -e 's/^\([^:]*:[^:]*:\)[^@%:@]*\( @%:@error\)/\1\2/'  \
+               -e "/^[^:]*: In function '[^\']*':$/d"                \
+            stderr]],
+         0, [stdout])
 ])
 
 # AT_TEST_SYNCLINE(TITLE, INPUT, ERROR-MSG)