@@ -357,11 +357,11 @@ mod test {
357
357
358
358
/**
359
359
* Records that the caller intends to create a directory with relative
360
- * path "path" underneath the root directory for this log test. Returns
361
- * a String representing the path to this directory. This directory
362
- * will be removed during teardown. Directories and files must be
363
- * recorded in the order they would be created so that the order can be
364
- * reversed at teardown (without needing any kind of recursive removal).
360
+ * path "path" underneath the root directory for this log test. Returns
361
+ * the path to this directory. This directory will be removed during
362
+ * teardown. Directories and files must be recorded in the order they
363
+ * would be created so that the order can be reversed at teardown
364
+ * (without needing any kind of recursive removal).
365
365
*/
366
366
fn will_create_dir ( & mut self , path : & str ) -> PathBuf {
367
367
let mut pathbuf = self . directory . clone ( ) ;
@@ -428,6 +428,10 @@ mod test {
428
428
) ;
429
429
430
430
assert ! ( result. is_err( ) ) ;
431
+ assert ! ( result. unwrap_err( ) . to_string( ) . starts_with( & format!(
432
+ "open log file \" {}\" : Is a directory" ,
433
+ & path. display( )
434
+ ) ) ) ;
431
435
}
432
436
433
437
#[ test]
@@ -452,6 +456,10 @@ mod test {
452
456
) ;
453
457
454
458
assert ! ( result. is_err( ) ) ;
459
+ assert ! ( result. unwrap_err( ) . to_string( ) . starts_with( & format!(
460
+ "open log file \" {}\" : File exists" ,
461
+ & path
462
+ ) ) ) ;
455
463
}
456
464
457
465
/*
0 commit comments