Scaffolding of a test

This commit is contained in:
Cyryl Płotnicki 2018-08-18 18:39:40 +01:00
parent 99e10bd8e0
commit 3c8a8cd57a
2 changed files with 27 additions and 8 deletions

View file

@ -4,4 +4,9 @@ Goals:
* memory usage limit * memory usage limit
* encryption by default - asymmetric, creates a keypair for you * encryption by default - asymmetric, creates a keypair for you
* deduplication * deduplication
* fuzzy find by file name in stored files
Implementation:
* hash -> file and file -> hash indexes
* use vfs to store both db and data files, create a new one when old one too big
* start with simple read file -> hash -> encrypt -?> send

View file

@ -1,13 +1,27 @@
fn main() {
println!("Hello, world!");
}
#[cfg(test)]
mod should {
#[test] mod index {
fn hash_scanned_files(){ use super::*;
#[cfg(test)]
mod should {
#[test]
fn recognize_files_of_same_contents() {
let file_source = FileSource::new();
file_source.add("file name 1", "file contents 1");
file_source.add("file name 2", "file contents 1");
file_source.add("file name 3", "file contents 3");
let contents_hasher = FakeContentsHasher::default();
let index = Index::with(file_source, contents_hasher);
}
} }
} }