MCPcopy Create free account
hub / github.com/KLayout/klayout / test_7

Method test_7

testdata/klayout_main/main.rb:125–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 end
124
125 def test_7
126
127 cfg_file = File.join($ut_testtmp, "config.xml")
128 File.open(cfg_file, "w") { |file| file.puts("<config/>") }
129
130 # Special configuration file
131 `#{self.klayout_bin} -b -c #{cfg_file} -r #{File.join(File.dirname(__FILE__), "test_set_config1.rb")} 2>&1`
132
133 out = `#{self.klayout_bin} -b -c #{cfg_file} -r #{File.join(File.dirname(__FILE__), "test_read_config.rb")} 2>&1`
134 assert_equal(out, "42\n")
135
136 # Update
137 `#{self.klayout_bin} -b -c #{cfg_file} -r #{File.join(File.dirname(__FILE__), "test_set_config2.rb")} 2>&1`
138
139 out = `#{self.klayout_bin} -b -c #{cfg_file} -r #{File.join(File.dirname(__FILE__), "test_read_config.rb")} 2>&1`
140 assert_equal(out, "17\n")
141
142 # Reset
143 `#{self.klayout_bin} -b -c #{cfg_file} -r #{File.join(File.dirname(__FILE__), "test_set_config1.rb")} 2>&1`
144
145 out = `#{self.klayout_bin} -b -c #{cfg_file} -r #{File.join(File.dirname(__FILE__), "test_read_config.rb")} 2>&1`
146 assert_equal(out, "42\n")
147
148 # No update
149 `#{self.klayout_bin} -b -t -c #{cfg_file} -r #{File.join(File.dirname(__FILE__), "test_set_config2.rb")} 2>&1`
150
151 out = `#{self.klayout_bin} -b -c #{cfg_file} -r #{File.join(File.dirname(__FILE__), "test_read_config.rb")} 2>&1`
152 assert_equal(out, "42\n")
153
154 end
155
156 def test_8
157

Callers

nothing calls this directly

Calls 4

klayout_binMethod · 0.95
joinMethod · 0.45
openMethod · 0.45
putsMethod · 0.45

Tested by

no test coverage detected