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

  1. extern crate nrgrip;
  2. use nrgrip::metadata;
  3. use std::fs::File;
  4. use std::io::{Seek, SeekFrom};
  5. use std::path::PathBuf;
  6. #[test]
  7. fn nrg_format() {
  8. let mut img = PathBuf::new();
  9. img.push("tests");
  10. img.push("minimal_v1.nrg");
  11. let mut fd = File::open(img)
  12. .expect("File::open()");
  13. let size = fd.seek(SeekFrom::End(0))
  14. .expect("fd.seek()");
  15. let ver = metadata::read_nrg_version(&mut fd, size)
  16. .expect("read_nrg_version()");
  17. assert_eq!(ver, 1);
  18. }