diff --git a/tests/cli.rs b/tests/cli.rs index 5fa4cd9..b73d8a3 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -7,9 +7,23 @@ use predicates::prelude::*; fn dump_glyph() -> Result<(), Box> { let mut cmd = Command::cargo_bin("allsorts")?; cmd.args(&["dump", "-g", "1", "tests/Basic-Regular.ttf"]); - cmd.assert().success().stdout(predicate::str::starts_with( - "Parsed(\n Glyph {\n number_of_contours: 3,", - )); + let expected = r#"Parsed( + Simple( + SimpleGlyph { + bounding_box: BoundingBox { + x_min: 158, + x_max: 1082, + y_min: 0, + y_max: 1358, + }, + end_pts_of_contours: [ + 22, + 35, + 44, + ],"#; + cmd.assert() + .success() + .stdout(predicate::str::starts_with(expected)); Ok(()) } @@ -19,7 +33,15 @@ fn dump_empty_glyph() -> Result<(), Box> { // Glyph 112 is .null let mut cmd = Command::cargo_bin("allsorts")?; cmd.args(&["dump", "-g", "112", "tests/Basic-Regular.ttf"]); - cmd.assert().success().stdout("Empty\n"); + let expected = r#"Parsed( + Empty( + EmptyGlyph { + phantom_points: None, + }, + ), +) +"#; + cmd.assert().success().stdout(expected); Ok(()) }