File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -389,6 +389,7 @@ mod test {
389
389
check_mime ( "{}" , "hello.json" , "application/json" ) ;
390
390
check_mime ( "hello world" , "hello.txt" , "text/plain" ) ;
391
391
check_mime ( "//! Simple module to ..." , "file.rs" , "text/rust" ) ;
392
+ check_mime ( "<svg></svg>" , "important.svg" , "image/svg+xml" ) ;
392
393
}
393
394
394
395
fn check_mime ( content : & str , path : & str , expected_mime : & str ) {
Original file line number Diff line number Diff line change @@ -63,12 +63,14 @@ mod test {
63
63
fs:: write ( doc. join ( "index.txt" ) , "spooky" ) . unwrap ( ) ;
64
64
fs:: write ( doc. join ( "inner" ) . join ( "index.html" ) , "<html>spooky</html>" ) . unwrap ( ) ;
65
65
fs:: write ( doc. join ( "inner" ) . join ( "index.txt" ) , "spooky" ) . unwrap ( ) ;
66
+ fs:: write ( doc. join ( "inner" ) . join ( "important.svg" ) , "<svg></svg>" ) . unwrap ( ) ;
66
67
67
68
// lets try to copy a src directory to tempdir
68
69
copy_doc_dir ( source. path ( ) . join ( "doc" ) , destination. path ( ) ) . unwrap ( ) ;
69
70
assert ! ( destination. path( ) . join( "index.html" ) . exists( ) ) ;
70
71
assert ! ( !destination. path( ) . join( "index.txt" ) . exists( ) ) ;
71
72
assert ! ( destination. path( ) . join( "inner" ) . join( "index.html" ) . exists( ) ) ;
72
73
assert ! ( !destination. path( ) . join( "inner" ) . join( "index.txt" ) . exists( ) ) ;
74
+ assert ! ( !destination. path( ) . join( "inner" ) . join( "important.svg" ) . exists( ) ) ;
73
75
}
74
76
}
You can’t perform that action at this time.
0 commit comments