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
77
77
)
78
78
}
79
79
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
+ }
93
98
}
94
99
95
100
pub ( crate ) fn normalize_path ( path : & Path ) -> PathBuf {
You can’t perform that action at this time.
0 commit comments