mirror of https://github.com/KLayout/klayout.git
Fixed #358 (strm2oas was producing GDS)
This commit is contained in:
parent
6a305cfbbf
commit
a50fadffcd
|
|
@ -25,5 +25,5 @@
|
||||||
|
|
||||||
BD_PUBLIC int strm2oas (int argc, char *argv[])
|
BD_PUBLIC int strm2oas (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
return bd::converter_main (argc, argv, bd::GenericWriterOptions::gds2_format_name);
|
return bd::converter_main (argc, argv, bd::GenericWriterOptions::oasis_format_name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,20 @@ class Buddies_TestClass < TestBase
|
||||||
|
|
||||||
def test_converters
|
def test_converters
|
||||||
|
|
||||||
|
signatures = {
|
||||||
|
"strm2cif" => 0x28434946,
|
||||||
|
"strm2dxf" => 0x300a5345,
|
||||||
|
"strm2gds" => 0x00060002,
|
||||||
|
"strm2gdstxt" => 0x48454144,
|
||||||
|
"strm2oas" => 0x2553454d,
|
||||||
|
"strm2txt" => 0x62656769,
|
||||||
|
}
|
||||||
|
|
||||||
%w(strm2cif strm2dxf strm2gds strm2gdstxt strm2oas strm2txt).each do |bin|
|
%w(strm2cif strm2dxf strm2gds strm2gdstxt strm2oas strm2txt).each do |bin|
|
||||||
|
|
||||||
puts "Testing #{bin} ..."
|
puts "Testing #{bin} ..."
|
||||||
|
|
||||||
out_file = File.join($ut_testtmp, "out")
|
out_file = File.join($ut_testtmp, "out_" + bin)
|
||||||
if File.exists?(out_file)
|
if File.exists?(out_file)
|
||||||
File.unlink(out_file)
|
File.unlink(out_file)
|
||||||
end
|
end
|
||||||
|
|
@ -63,6 +72,11 @@ class Buddies_TestClass < TestBase
|
||||||
assert_equal(File.exists?(out_file), true)
|
assert_equal(File.exists?(out_file), true)
|
||||||
assert_equal(log, bin + "\n")
|
assert_equal(log, bin + "\n")
|
||||||
|
|
||||||
|
File.open(out_file, "rb") do |file|
|
||||||
|
sig = file.read(4).unpack('N').first
|
||||||
|
assert_equal(sig, signatures[bin])
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue