@@ -6,30 +6,31 @@ use lofty::flac::FlacFile;
6
6
use lofty:: ogg:: VorbisComments ;
7
7
use lofty:: { Accessor , AudioFile , ParseOptions } ;
8
8
9
+ // TODO: We don't support FLAC in OGA (#172)
9
10
#[ test]
11
+ #[ ignore]
10
12
fn test_framing_bit ( ) {
11
- todo ! ( "We don't support FLAC in OGA" )
12
- // let mut file = temp_file!("tests/taglib/data/empty_flac.oga");
13
- //
14
- // {
15
- // let mut f = FlacFile::read_from(&mut file, ParseOptions::new()).unwrap();
16
- // file.rewind().unwrap();
17
- //
18
- // let mut vorbis_comments = VorbisComments::new();
19
- // vorbis_comments.set_artist(String::from("The Artist"));
20
- // f.set_vorbis_comments(vorbis_comments);
21
- // f.save_to(&mut file).unwrap();
22
- // }
23
- // file.rewind().unwrap();
24
- // {
25
- // let f = FlacFile::read_from(&mut file, ParseOptions::new()).unwrap();
26
- // assert_eq!(
27
- // f.vorbis_comments().unwrap().artist().as_deref(),
28
- // Some("The Artist")
29
- // );
30
- //
31
- // assert_eq!(file.seek(SeekFrom::End(0)).unwrap(), 9134);
32
- // }
13
+ let mut file = temp_file ! ( "tests/taglib/data/empty_flac.oga" ) ;
14
+
15
+ {
16
+ let mut f = FlacFile :: read_from ( & mut file, ParseOptions :: new ( ) ) . unwrap ( ) ;
17
+ file. rewind ( ) . unwrap ( ) ;
18
+
19
+ let mut vorbis_comments = VorbisComments :: new ( ) ;
20
+ vorbis_comments. set_artist ( String :: from ( "The Artist" ) ) ;
21
+ f. set_vorbis_comments ( vorbis_comments) ;
22
+ f. save_to ( & mut file) . unwrap ( ) ;
23
+ }
24
+ file. rewind ( ) . unwrap ( ) ;
25
+ {
26
+ let f = FlacFile :: read_from ( & mut file, ParseOptions :: new ( ) ) . unwrap ( ) ;
27
+ assert_eq ! (
28
+ f. vorbis_comments( ) . unwrap( ) . artist( ) . as_deref( ) ,
29
+ Some ( "The Artist" )
30
+ ) ;
31
+
32
+ assert_eq ! ( file. seek( SeekFrom :: End ( 0 ) ) . unwrap( ) , 9134 ) ;
33
+ }
33
34
}
34
35
35
36
// TODO: We don't support FLAC in OGA (#172)
0 commit comments