chore: clean project files
This commit is contained in:
parent
6cf9a81ff9
commit
914b9b066d
|
@ -198,37 +198,4 @@ pub enum ArchiveAddError {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use vfs::{MemoryFS, VfsError, VfsPath};
|
|
||||||
|
|
||||||
const DATA_ROOT: &str = "/home/user/.local/share/save-sync";
|
|
||||||
const CONFIG_ROOT: &str = "/home/user/.config/save-sync";
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn try_default_works() {
|
|
||||||
let will_error = std::env::var("HOME").is_err();
|
|
||||||
let archive = Archive::try_default();
|
|
||||||
|
|
||||||
assert_ne!(archive.is_ok(), will_error);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn new_works() {
|
|
||||||
let archive = Archive::new(DATA_ROOT, CONFIG_ROOT);
|
|
||||||
|
|
||||||
assert_eq!(archive.data_root, PathBuf::from(DATA_ROOT));
|
|
||||||
assert_eq!(archive.config_root, PathBuf::from(CONFIG_ROOT));
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn track_file_works() {}
|
|
||||||
|
|
||||||
fn create_test_archive(vfs_root: VfsPath) -> Archive {
|
|
||||||
let data_root = vfs_root.join(DATA_ROOT).unwrap();
|
|
||||||
let config_root = vfs_root.join(CONFIG_ROOT).unwrap();
|
|
||||||
data_root.create_file().unwrap();
|
|
||||||
config_root.create_file().unwrap();
|
|
||||||
dbg!(&data_root);
|
|
||||||
|
|
||||||
Archive::new(data_root, config_root)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,19 +6,19 @@ pub fn calc_file_hash(path: &Path) -> Option<u64> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn archive_directory(source: &Path, dest: &Path) -> Result<(), Box<dyn std::error::Error>> {
|
pub fn archive_directory(src: &Path, dst: &Path) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn archive_file(source: &Path, dest: &Path) -> Result<(), Box<dyn std::error::Error>> {
|
pub fn archive_file(src: &Path, dst: &Path) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn unarchive_directory(source: &Path, dest: &Path) -> Result<(), Box<dyn std::error::Error>> {
|
pub fn unarchive_directory(src: &Path, dst: &Path) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn unarchive_file(source: &Path, dest: &Path) -> Result<(), Box<dyn std::error::Error>> {
|
pub fn unarchive_file(src: &Path, dst: &Path) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue