@@ -5,6 +5,7 @@ use crate::{
55    driver, 
66    fs:: { Attribute ,  File ,  Filesystem } , 
77    io:: { Error ,  OpenSeekFrom ,  Read ,  Result ,  SeekFrom } , 
8+     path:: PathBuf , 
89} ; 
910
1011ram_storage ! ( 
@@ -492,13 +493,15 @@ fn test_iter_dirs() {
492493                tells. push ( dir. tell ( ) ?) ; 
493494                let  entry = entry?; 
494495
495-                 // assert_eq!(entry.file_name(), match i { 
496-                 //     0 => b".\0", 
497-                 //     1 => b"..\0", 
498-                 //     2 => b"file.a\0", 
499-                 //     3 => b"file.b\0", 
500-                 //     _ => panic!("oh noes"), 
501-                 // }); 
496+                 let  expected_name = match  i { 
497+                     0  => PathBuf :: from ( b".\0 " . as_slice ( ) ) , 
498+                     1  => PathBuf :: from ( b"..\0 " . as_slice ( ) ) , 
499+                     2  => PathBuf :: from ( b"file.a\0 " . as_slice ( ) ) , 
500+                     3  => PathBuf :: from ( b"file.b\0 " . as_slice ( ) ) , 
501+                     _ => panic ! ( "oh noes" ) , 
502+                 } ; 
503+ 
504+                 assert_eq ! ( entry. file_name( ) ,  & * expected_name) ; 
502505
503506                sizes[ i]  = entry. metadata ( ) . len ( ) ; 
504507                found_files += 1 ; 
@@ -507,6 +510,7 @@ fn test_iter_dirs() {
507510
508511            assert_eq ! ( sizes,  [ 0 ,  0 ,  37 ,  42 ] ) ; 
509512            assert_eq ! ( found_files,  4 ) ; 
513+             assert_eq ! ( tells. len( ) ,  5 ) ; 
510514
511515            for  ( i,  tell)  in  tells. iter ( ) . enumerate ( )  { 
512516                dir. rewind ( ) . unwrap ( ) ; 
0 commit comments