File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var URL_MATCH = / ^ ( [ ^ : ] + ) : \/ \/ ( \w + : { 0 , 1 } \w * @ ) ? ( [ \w \. - ] * ) ( : ( [ 0 - 9 ] + ) ) ? ( \/ [ ^ \? # ] * ) ? ( \? ( [ ^ # ] * ) ) ? ( # ( .* ) ) ? $ / ,
3
+ var URL_MATCH = / ^ ( [ ^ : ] + ) : \/ \/ ( \w + : { 0 , 1 } \w * @ ) ? ( [ \{ \} \ w\. - ] * ) ( : ( [ 0 - 9 ] + ) ) ? ( \/ [ ^ \? # ] * ) ? ( \? ( [ ^ # ] * ) ) ? ( # ( .* ) ) ? $ / ,
4
4
PATH_MATCH = / ^ ( [ ^ \? # ] * ) ? ( \? ( [ ^ # ] * ) ) ? ( # ( .* ) ) ? $ / ,
5
5
HASH_MATCH = PATH_MATCH ,
6
6
DEFAULT_PORTS = { 'http' : 80 , 'https' : 443 , 'ftp' : 21 } ;
Original file line number Diff line number Diff line change @@ -666,6 +666,16 @@ describe('$location', function() {
666
666
expect ( match [ 8 ] ) . toBe ( 'foo' ) ;
667
667
expect ( match [ 10 ] ) . toBe ( 'bar' ) ;
668
668
} ) ;
669
+
670
+ it ( 'should parse FFOS app:// urls' , function ( ) {
671
+ var match = URL_MATCH . exec ( 'app://{d0419af1-8b42-41c5-96f4-ef4179e52315}/path' ) ;
672
+
673
+ expect ( match [ 1 ] ) . toBe ( 'app' ) ;
674
+ expect ( match [ 3 ] ) . toBe ( '{d0419af1-8b42-41c5-96f4-ef4179e52315}' ) ;
675
+ expect ( match [ 5 ] ) . toBeFalsy ( ) ;
676
+ expect ( match [ 6 ] ) . toBe ( '/path' ) ;
677
+ expect ( match [ 8 ] ) . toBeFalsy ( ) ;
678
+ } ) ;
669
679
} ) ;
670
680
671
681
You can’t perform that action at this time.
0 commit comments