| 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 |
nothing calls this directly
no test coverage detected