]> git.saurik.com Git - bison.git/blobdiff - tests/actions.at
%define lr.type: make values lowercase IDs.
[bison.git] / tests / actions.at
index 32bfc34e4c4a2d59cb4957a09e06fb6dc4cb1c61..dd57b0809057a26bbfc0e615853814ed11678991 100644 (file)
@@ -1,6 +1,6 @@
 # Executing Actions.                               -*- Autotest -*-
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008-2009 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
@@ -1400,20 +1400,11 @@ input.y:35.1: warning: future versions of Bison will not add the `;'
 input.y:36.1: warning: a `;' might be needed at the end of action code
 input.y:36.1: warning: future versions of Bison will not add the `;'
 ]])
-AT_CHECK([[grep -c '/\* TEST:N:2 \*/ }$' input.c]], [0], [[3
-]])
-AT_CHECK([[grep -c '/\* TEST:Y:2 \*/ ;}$' input.c]], [0], [[6
-]])
-AT_CHECK([[sed -n '/TEST:N:1/{N
-s/\n/<NL>/gp}' input.c | grep -c '// TEST:N:1 [;{}]*<NL>}$']], [0], [[6
-]])
-AT_CHECK([[sed -n '/TEST:Y:1/{N
-s/\n/<NL>/gp}' input.c | grep -c '// TEST:Y:1 [;{}]*<NL>;}$']], [0], [[12
-]])
-AT_CHECK([[sed -n '/^#define TEST_MACRO_N/{N
-N
-s/\n/<NL>/gp}' input.c | grep -F -xc '#define TEST_MACRO_N \<NL>[]"broken\" $ @ $$ @$ [];\<NL>string;"}']],
-       [0], [[2
-]])
+
+AT_MATCHES_CHECK([input.c], [[/\* TEST:N:2 \*/ \}$]],       [[3]])
+AT_MATCHES_CHECK([input.c], [[/\* TEST:Y:2 \*/ ;\}$]],      [[6]])
+AT_MATCHES_CHECK([input.c], [[// TEST:N:1 [;{}]*\n\}$]],    [[6]])
+AT_MATCHES_CHECK([input.c], [[// TEST:Y:1 [;{}]*\n;\}$]],  [[12]])
+AT_MATCHES_CHECK([input.c], [[#define TEST_MACRO_N \\\n\[\]"broken\\" \$ \@ \$\$ \@\$ \[\];\\\nstring;"\}]], [[2]])
 
 AT_CLEANUP