diff options
author | Steven Knight <knight@baldmt.com> | 2003-07-02 04:39:48 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-07-02 04:39:48 (GMT) |
commit | 4494c32726f5560df070bd13696272e88babcb3c (patch) | |
tree | b0d785fd9030d2e79b2af3cf1f1bd993fca296ad /test | |
parent | f7eddbc1949e72d148a877a8f48c615cdb9487d7 (diff) | |
download | SCons-4494c32726f5560df070bd13696272e88babcb3c.zip SCons-4494c32726f5560df070bd13696272e88babcb3c.tar.gz SCons-4494c32726f5560df070bd13696272e88babcb3c.tar.bz2 |
When an input yacc file ends in .yy and the yacc -d flag is used, expect a generated .hpp file, not a .h file.
Diffstat (limited to 'test')
-rw-r--r-- | test/YACC.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/YACC.py b/test/YACC.py index 68a0ba5..a93b968 100644 --- a/test/YACC.py +++ b/test/YACC.py @@ -103,6 +103,8 @@ yacc = foo.Dictionary('YACC') bar = Environment(YACC = r'%s wrapper.py ' + yacc) foo.Program(target = 'foo', source = 'foo.y') bar.Program(target = 'bar', source = 'bar.y') +foo.Program(target = 'hello', source = ['hello.cpp']) +foo.CXXFile(target = 'file.cpp', source = ['file.yy'], YACCFLAGS='-d') """ % python) yacc = r""" @@ -135,6 +137,26 @@ letter: 'a' | 'b'; newline: '\n'; """ + test.write("file.yy", """\ +%token GRAPH_T NODE_T EDGE_T DIGRAPH_T EDGEOP_T SUBGRAPH_T + +%pure_parser + +%% +graph: GRAPH_T + ; + +%% +""") + + test.write("hello.cpp", """\ +#include "file.hpp" + +int main() +{ +} +""") + test.write('foo.y', yacc % 'foo.y') test.write('bar.y', yacc % 'bar.y') @@ -161,4 +183,8 @@ newline: '\n'; test.fail_test(os.path.exists(test.workpath('foo.h'))) + test.run(arguments = '.') + + test.up_to_date(arguments = '.') + test.pass_test() |