Merge pull request #361 from KLayout/issue-358

Fixed #358 (strm2oas was producing GDS)
This commit is contained in:
Matthias Köfferlein 2019-09-18 21:17:48 +02:00 committed by GitHub
commit 9edb9d61ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View File

@ -25,5 +25,5 @@
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);
}

View File

@ -47,11 +47,20 @@ class Buddies_TestClass < TestBase
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|
puts "Testing #{bin} ..."
out_file = File.join($ut_testtmp, "out")
out_file = File.join($ut_testtmp, "out_" + bin)
if File.exists?(out_file)
File.unlink(out_file)
end
@ -63,6 +72,11 @@ class Buddies_TestClass < TestBase
assert_equal(File.exists?(out_file), true)
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