#[test]
fn test_parsing_with_spaces_produces_canonical_format() {
use dcbor_pattern::Pattern;
let or_with_spaces = Pattern::parse("bool | text | number").unwrap();
let and_with_spaces = Pattern::parse("bool & text & number").unwrap();
let or_no_spaces = Pattern::parse("bool|text|number").unwrap();
let and_no_spaces = Pattern::parse("bool&text&number").unwrap();
assert_eq!(or_no_spaces.to_string(), or_with_spaces.to_string());
assert_eq!(and_no_spaces.to_string(), and_with_spaces.to_string());
assert_eq!(or_with_spaces.to_string(), "bool | text | number");
assert_eq!(and_with_spaces.to_string(), "bool & text & number");
}