MCPcopy Create free account
hub / github.com/cpmech/plotpy / test_plot_handles_quotes

Function test_plot_handles_quotes

tests/test_plot.rs:170–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168
169#[test]
170fn 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]
189fn test_plot_title_handles_tex() -> Result<(), StrError> {

Callers

nothing calls this directly

Calls 3

saveMethod · 0.80
set_titleMethod · 0.45

Tested by

no test coverage detected