/[bison]/bison/tests/regression.at
ViewVC logotype

Diff of /bison/tests/regression.at

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by akim, Fri Dec 15 09:44:44 2000 UTC revision 1.2 by akim, Thu Oct 4 14:55:21 2001 UTC
# Line 1  Line 1 
1  #                                                        -*- Autoconf -*-  # Bison Regressions.                               -*- Autotest -*-
2    # Copyright 2001 Free Software Foundation, Inc.
3    
4  cat <<EOF  # This program is free software; you can redistribute it and/or modify
5    # it under the terms of the GNU General Public License as published by
6  Regression tests.  # the Free Software Foundation; either version 2, or (at your option)
7    # any later version.
8  EOF  
9    # This program is distributed in the hope that it will be useful,
10    # but WITHOUT ANY WARRANTY; without even the implied warranty of
11    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    # GNU General Public License for more details.
13    
14    # You should have received a copy of the GNU General Public License
15    # along with this program; if not, write to the Free Software
16    # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17    # 02111-1307, USA.
18    
19    AT_BANNER([[Regression tests.]])
20    
21  ## ------------------ ##  ## ------------------ ##
22  ## Duplicate string.  ##  ## Duplicate string.  ##
# Line 53  exp: {}; Line 64  exp: {};
64  AT_CHECK([bison --defines union.y])  AT_CHECK([bison --defines union.y])
65    
66  AT_CLEANUP([union.*])  AT_CLEANUP([union.*])
67    
68    
69    ## --------------------------------------- ##
70    ## Duplicate '/' in C comments in %union   ##
71    ## --------------------------------------- ##
72    
73    
74    AT_SETUP([%union and C comments])
75    
76    AT_DATA([union-comment.y],
77    [%union
78    {
79      /* The int.  */       int   integer;
80      /* The string.  */    char *string ;
81    }
82    %%
83    exp: {};
84    ])
85    
86    AT_CHECK([bison union-comment.y])
87    AT_CHECK([fgrep '//*' union-comment.tab.c], [1], [])
88    
89    AT_CLEANUP([union-comment.*])
90    
91    
92    ## --------------- ##
93    ## invalid input.  ##
94    ## --------------- ##
95    
96    
97    AT_SETUP([Invalid input])
98    
99    AT_DATA([input.y],
100    [[%%
101    ?
102    ]])
103    
104    AT_CHECK([bison input.y], [1], [],
105    [input.y:2: invalid input: `?'
106    input.y:3: fatal error: no rules in the input grammar
107    ])
108    
109    AT_CLEANUP
110    
111    
112    ## --------------------- ##
113    ## Invalid CPP headers.  ##
114    ## --------------------- ##
115    
116    AT_SETUP([Invalid CPP headers])
117    
118    mkdir input
119    
120    AT_DATA([input/input.y],
121    [%%
122    dummy:
123    ])
124    
125    AT_CHECK([bison --defines input/input.y])
126    
127    AT_CHECK([sed 1q input/input.tab.h], 0,
128    [[#ifndef INPUT_INPUT_TAB_H
129    ]])
130    
131    AT_CLEANUP(input)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26