easy_archive/
lib.rs

1mod archive;
2mod tool;
3mod ty;
4
5pub use archive::*;
6pub use tool::*;
7pub use ty::*;
8
9#[cfg(test)]
10mod test {
11    use crate::ty::Fmt;
12
13    #[test]
14    fn test_decode() {
15        for name in std::fs::read_dir("../assets").unwrap() {
16            let path = name.unwrap().path();
17            let buffer = std::fs::read(&path).unwrap();
18            let fmt = Fmt::guess(&path.to_string_lossy()).unwrap();
19            let files = fmt.decode(buffer).unwrap();
20            let dist = files
21                .iter()
22                .find(|i| i.path == "mujs-build-0.0.11/dist-manifest.json")
23                .unwrap();
24            assert!(!dist.buffer.is_empty());
25        }
26    }
27}