()
| 168 | |
| 169 | #[test] |
| 170 | fn test_plot_handles_quotes() -> Result<(), StrError> { |
| 171 | let mut plot = Plot::new(); |
| 172 | plot.set_title("\"$\\int$ \"The Plot of the Developer\" $versus$ \"Developer's Plot\" $\\mathrm{d}\\sigma$\""); |
| 173 | |
| 174 | // save figure |
| 175 | let path = Path::new(OUT_DIR).join("integ_plot_handles_quotes.svg"); |
| 176 | plot.set_figure_size_points(250.0, 250.0 * 0.75); |
| 177 | plot.save(&path)?; |
| 178 | |
| 179 | // check number of lines |
| 180 | let file = File::open(path).map_err(|_| "cannot open file")?; |
| 181 | let buffered = BufReader::new(file); |
| 182 | let lines_iter = buffered.lines(); |
| 183 | let count = lines_iter.count(); |
| 184 | assert!(count > 920 && count < 980); |
| 185 | Ok(()) |
| 186 | } |
| 187 | |
| 188 | #[test] |
| 189 | fn test_plot_title_handles_tex() -> Result<(), StrError> { |
nothing calls this directly
no test coverage detected