diff --git a/src/parser/parser.rs b/src/parser/parser.rs index 6f14407..3b8b30c 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -919,8 +919,6 @@ mod tests { ); } - // TODO: Add test for integer literals - #[test] fn test_quoted_partial() { assert_eq!( @@ -944,6 +942,29 @@ mod tests { ); } + #[test] + fn test_literals() { + assert_eq!( + dust_tag(r#"{>foo a="foo" b=179/}"#), + Ok(( + "", + DustTag::DTPartial(Partial { + name: "foo".to_owned(), + params: vec![ + KVPair { + key: "a", + value: RValue::RVString("foo".to_owned()) + }, + KVPair { + key: "b", + value: RValue::RVPositiveInteger(179) + } + ] + }) + )) + ); + } + #[test] fn test_helper() { assert_eq!(