summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-06-06 22:34:28 +0200
committerJoel Klinghed <the_jk@spawned.biz>2025-06-06 22:35:32 +0200
commita7a5ec7b626b72c0156d6f6edc8b8d2b62bf321d (patch)
tree6e97e11d8c081be6b478d01d6aa0f2c9160f457d
parentf25b8789962157f7fa2af55b139a75e2ee1a09af (diff)
grit: Add test for parsing grit-part
-rw-r--r--server/common/src/tests.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/server/common/src/tests.rs b/server/common/src/tests.rs
index f336f67..c275c70 100644
--- a/server/common/src/tests.rs
+++ b/server/common/src/tests.rs
@@ -523,3 +523,21 @@ async fn test_grit_parse_base() {
},
)
}
+
+#[tokio::test]
+async fn test_grit_parse_extra() {
+ let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("src/testdata/grit/extra.grdp");
+ let grit = grit::parse_grit_part(path).await.unwrap();
+ assert_eq!(
+ grit,
+ grit::GritPart {
+ messages: vec![grit::IfMessage::Message(grit::Message {
+ desc: "Extra title".to_string(),
+ name: "IDS_EXTRA".to_string(),
+ internal_comment: None,
+ meaning: None,
+ content: vec![grit::TextPlaceholder::Text("Extra title".to_string()),],
+ },),],
+ },
+ )
+}