diff --git a/tests/test.rs b/tests/test.rs index ebf4aeb..88794da 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -4,7 +4,9 @@ use eyre::Result; use proc_macro2::TokenStream; use quote::{quote, ToTokens}; use rstml::{ - node::{KeyedAttribute, KeyedAttributeValue, Node, NodeAttribute, NodeElement, NodeType}, + node::{ + KeyedAttribute, KeyedAttributeValue, Node, NodeAttribute, NodeElement, NodeName, NodeType, + }, parse2, Parser, ParserConfig, }; use syn::{parse_quote, token::Colon, Block, LifetimeParam, Pat, PatType, Token, TypeParam}; @@ -885,6 +887,12 @@ fn test_empty_input() -> Result<()> { Ok(()) } +#[test] +fn test_consecutive_puncts_in_name() { + let name: NodeName = parse_quote! { a--::..d }; + assert_eq!(name.to_string(), "a--::..d"); +} + fn get_element(nodes: &[Node], element_index: usize) -> &NodeElement { let Some(Node::Element(element)) = nodes.get(element_index) else { panic!("expected element")