1
+ use bstr:: BString ;
1
2
use gix_object:: {
2
3
bstr:: ByteSlice ,
3
4
tree:: { self , Entry , EntryRef } ,
4
- FindExt , TreeRefIter ,
5
+ TreeRefIter ,
5
6
} ;
6
7
use pretty_assertions:: assert_eq;
7
8
@@ -62,8 +63,11 @@ fn everything() -> crate::Result {
62
63
fn lookup_entry_toplevel ( ) -> crate :: Result {
63
64
let entry = utils:: lookup_entry_by_path ( "bin" ) ?;
64
65
65
- assert ! ( matches!( entry, Entry { .. } ) ) ;
66
- assert_eq ! ( entry. filename, "bin" ) ;
66
+ let mode: tree:: EntryMode = tree:: EntryMode ( 33188 ) ;
67
+ let filename: BString = "bin" . into ( ) ;
68
+ let oid = hex_to_id ( "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391" ) ;
69
+
70
+ assert_eq ! ( entry, Entry { mode, filename, oid } ) ;
67
71
68
72
Ok ( ( ) )
69
73
}
@@ -72,8 +76,11 @@ fn lookup_entry_toplevel() -> crate::Result {
72
76
fn lookup_entry_nested_path ( ) -> crate :: Result {
73
77
let entry = utils:: lookup_entry_by_path ( "file/a" ) ?;
74
78
75
- assert ! ( matches!( entry, Entry { .. } ) ) ;
76
- assert_eq ! ( entry. filename, "a" ) ;
79
+ let mode: tree:: EntryMode = tree:: EntryMode ( 33188 ) ;
80
+ let filename: BString = "a" . into ( ) ;
81
+ let oid = hex_to_id ( "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391" ) ;
82
+
83
+ assert_eq ! ( entry, Entry { mode, filename, oid } ) ;
77
84
78
85
Ok ( ( ) )
79
86
}
0 commit comments