1
- use lofty:: { Accessor , AudioFile , FileType , TaggedFileExt } ;
1
+ use lofty:: { Accessor , AudioFile , FileType , ParseOptions , TaggedFileExt } ;
2
2
3
- use std:: io:: Seek ;
3
+ use lofty:: iff:: aiff:: AiffFile ;
4
+ use std:: io:: { Read , Seek } ;
4
5
5
6
use crate :: util:: get_filetype;
6
7
use crate :: { assert_delta, temp_file} ;
@@ -74,7 +75,7 @@ fn test_save_id3v2() {
74
75
75
76
let mut tag = tfile. tag ( lofty:: TagType :: Id3v2 ) . unwrap ( ) . to_owned ( ) ;
76
77
assert_eq ! ( tag. title( ) . as_deref( ) , Some ( "TitleXXX" ) ) ;
77
- tag. set_title ( "" . to_string ( ) ) ;
78
+ tag. set_title ( String :: new ( ) ) ;
78
79
tfile. insert_tag ( tag) ;
79
80
file. rewind ( ) . unwrap ( ) ;
80
81
tfile. save_to ( & mut file) . unwrap ( ) ;
@@ -92,8 +93,15 @@ fn test_save_id3v2() {
92
93
}
93
94
}
94
95
95
- // TODO: testSaveID3v23
96
- // TODO: testDuplicateID3v2
96
+ #[ test]
97
+ #[ ignore] // TODO: Support writing ID3v2.3 tags
98
+ fn test_save_id3v23 ( ) { }
99
+
100
+ #[ test]
101
+ #[ ignore]
102
+ fn test_duplicate_id3v2 ( ) {
103
+ // Marker test, Lofty will overwrite values in the original tag with any new values it finds in the next tag.
104
+ }
97
105
98
106
#[ test]
99
107
#[ ignore]
@@ -104,14 +112,8 @@ fn test_fuzzed_file1() {
104
112
) ;
105
113
}
106
114
107
- // the file doesn't even have a valid signature
108
- // #[test]
109
- // #[ignore]
110
- // fn test_fuzzed_file2() {
111
- // let mut file = File::open("tests/taglib/data/excessive_alloc.aif").unwrap();
112
- //
113
- // let mut buf = [0; 12];
114
- // file.read_exact(&mut buf).unwrap();
115
- //
116
- // assert_eq!(FileType::from_buffer(&buf).unwrap(), FileType::AIFF);
117
- // }
115
+ #[ test]
116
+ #[ ignore]
117
+ fn test_fuzzed_file2 ( ) {
118
+ // Marker test, this file doesn't even have a valid signature. No idea how TagLib manages to read it.
119
+ }
0 commit comments