File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ wss:// @ 󠄷 ㏴ ㅴ ㏴ 㩴 ㅴ ㏴ ㅴ . /
Original file line number Diff line number Diff line change @@ -2,6 +2,23 @@ use bstr::ByteSlice;
22use std:: path:: Path ;
33use std:: time:: Duration ;
44
5+ #[ test]
6+ #[ cfg_attr( debug_assertions, ignore = "fails due to integer overflow" ) ]
7+ fn abort_unfixed_in_debug_mode ( ) {
8+ let name = "very-long-abort" ;
9+ let base = Path :: new ( "tests" ) . join ( "fixtures" ) . join ( "fuzzed" ) ;
10+ let location = base. join ( Path :: new ( name) . with_extension ( "url" ) ) ;
11+ let url = std:: fs:: read ( & location) . unwrap ( ) ;
12+ let start = std:: time:: Instant :: now ( ) ;
13+ gix_url:: parse ( url. as_bstr ( ) ) . ok ( ) ;
14+ assert ! (
15+ start. elapsed( ) < Duration :: from_millis( 100 ) ,
16+ "URL at '{}' parsed too slowly, took {:.00}s" ,
17+ location. display( ) ,
18+ start. elapsed( ) . as_secs_f32( )
19+ ) ;
20+ }
21+
522#[ test]
623fn fuzzed ( ) {
724 for name in [
You can’t perform that action at this time.
0 commit comments