1 # Test that output_file_name and output_file_suffix produce the
2 # right results for all code generators
5 # For each test case, lists:
8 # 3. The expected suffix
9 tests = [[:amd64, :elf, '.o'],
10 [:amd64, :nasm, '.asm'],
12 [:i386, :nasm, '.asm'],
15 [:mipsel, :elf, '.o'],
16 [:mipsel, :gas, '.s']]
25 arch, fmt, suffix = test
26 generator = Voodoo::CodeGenerator.get_generator :architecture => arch,
29 x = generator.output_file_suffix
31 $stderr.puts "#{arch.inspect}, #{fmt.inspect} -- " +
32 "expected #{suffix.inspect}, but got #{x.inspect}"
36 expect = prefix + suffix
37 y = generator.output_file_name "#{prefix}.voo"
39 $stderr.puts "#{arch.inspect}, #{fmt.inspect} -- " +
40 "expected #{expect.inspect}, but got #{y.inspect}"
49 puts "#{errors} tests failed"