Extract audio and cue sheet from an NRG audio CD image.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

19 lines
491 B

extern crate nrgrip;
use nrgrip::metadata;
use std::fs::File;
use std::io::{Seek, SeekFrom};
use std::path::PathBuf;
#[test]
fn nrg_format() {
let mut img = PathBuf::new();
img.push("tests");
img.push("minimal_v2.nrg");
let mut fd = File::open(img)
.expect("File::open()");
let size = fd.seek(SeekFrom::End(0))
.expect("fd.seek()");
let ver = metadata::read_nrg_version(&mut fd, size)
.expect("read_nrg_version()");
assert_eq!(ver, 2);
}