File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -465,7 +465,7 @@ mod tests {
465465 }
466466
467467 #[ test]
468- fn test_fragment_delimeter_backwards_compatibility ( ) {
468+ fn test_fragment_delimiter_backwards_compatibility ( ) {
469469 // ensure + is still accepted as a delimiter
470470 let uri = "bitcoin:12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX?amount=0.01\
471471 &pjos=0&pj=HTTPS://EXAMPLE.COM/\
@@ -513,4 +513,15 @@ mod tests {
513513 Some ( "EX1C4UC6ES-OH1QYPM5JXYNS754Y4R45QWE336QFX6ZR8DQGVQCULVZTV20TFVEYDMFQC" )
514514 ) ;
515515 }
516+
517+ #[ test]
518+ fn test_fragment_mixed_delimiter ( ) {
519+ // mixing current and deprecated delimiters should fail
520+ let fragment = "23RK1QG2RH36X9ZWRK\
521+ 7UWCCQE0WD8T89XKK2W55KTK9UHSZLEG8Q2TGEGG-OH1QYP87E2AVMDKXDTU6R25WCPQ5ZUF02XHNPA65JMD8ZA2W4YRQN6UUWG+EX1XPK8Y6Q";
522+ assert ! ( matches!(
523+ check_fragment_delimiter( fragment) ,
524+ Err ( ParseFragmentError :: AmbiguousDelimiter )
525+ ) ) ;
526+ }
516527}
You can’t perform that action at this time.
0 commit comments