Skip to content

Commit e791475

Browse files
author
aamine
committed
o test: test also -E
git-svn-id: file:///Users/aaron/Desktop/public/racc/trunk@1860 1b9489fe-b721-0410-924e-b54b9192deb8
1 parent 9938230 commit e791475

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

test/test

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ def dotest( code )
2121
puts "ok: #{code}"
2222
end
2323

24-
def comptest( arg, chk = nil )
25-
fname = arg.shift
26-
opt = if arg.empty? then nil else arg.join(' ') end
24+
def comptest( args, chk = nil )
25+
fname = args.shift
2726
n = fname.sub(/\.y\z/, '')
28-
a = [ opt, '-Oout/' + n, '-otab/' + n ].compact
27+
args.push '-Oout/' + n
28+
args.push '-otab/' + n
29+
args.unshift '-Dapo'
30+
args.unshift '../racc'
31+
args.push fname
32+
2933
File.truncate 'log', 0
30-
dotest "../racc -Dapo #{a.join ' '} #{fname}"
34+
dotest args.join(' ')
3135
if chk then
3236
File.foreach( 'log' ) do |line|
3337
line.strip!
@@ -58,6 +62,7 @@ comptest %w( normal.y ), []
5862
comptest %w( normal.y -vg )
5963
comptest %w( chk.y -vg ), []; dotest 'tab/chk'
6064
comptest %w( chk.y -c ), []; dotest 'tab/chk'
65+
comptest %w( echk.y -E ), []; dotest 'tab/echk'
6166
comptest %w( err.y ), []; dotest 'tab/err'
6267
comptest %w( mailp.y ), []
6368
comptest %w( conf.y -v ), [4,1,1,2]

0 commit comments

Comments
 (0)