File tree Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Expand file tree Collapse file tree 1 file changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -77,19 +77,24 @@ pub(crate) fn improve_remove_error(error: std::io::Error, path: &Path) -> std::i
7777 )
7878}
7979
80- #[ test]
81- fn custom_remove_error ( ) {
82- let path = "test/path" . as_ref ( ) ;
83-
84- let expected = "failed to remove 'test/path' : PermissionDenied" ;
85- let tested = format ! (
86- "{}" ,
87- improve_remove_error(
88- std:: io:: Error :: from( std:: io:: ErrorKind :: PermissionDenied ) ,
89- path
90- )
91- ) ;
92- assert_eq ! ( expected, tested) ;
80+ #[ cfg( test) ]
81+ mod tests {
82+ use super :: * ;
83+
84+ #[ test]
85+ fn custom_remove_error ( ) {
86+ let path = "test/path" . as_ref ( ) ;
87+
88+ let expected = "failed to remove 'test/path' : PermissionDenied" ;
89+ let tested = format ! (
90+ "{}" ,
91+ improve_remove_error(
92+ std:: io:: Error :: from( std:: io:: ErrorKind :: PermissionDenied ) ,
93+ path
94+ )
95+ ) ;
96+ assert_eq ! ( expected, tested) ;
97+ }
9398}
9499
95100pub ( crate ) fn normalize_path ( path : & Path ) -> PathBuf {
You can’t perform that action at this time.
0 commit comments