54 lines
1.0 KiB
Rust
54 lines
1.0 KiB
Rust
use std::io::Write;
|
|
use std::path::Path;
|
|
use tempfile::{NamedTempFile, tempfile};
|
|
use gemma::test_compression::TestCompression;
|
|
|
|
mod test_utils;
|
|
|
|
#[test]
|
|
fn smoke() {
|
|
assert!(true)
|
|
}
|
|
|
|
#[test]
|
|
fn round_trip() {
|
|
let text_to_process = "The quick brown fox jumps over the lazy dog.";
|
|
let compressed = TestCompression::compress_string(text_to_process);
|
|
let decompressed = TestCompression::decompress_to_string(&compressed).unwrap();
|
|
|
|
assert_eq!(text_to_process, decompressed);
|
|
}
|
|
|
|
#[test]
|
|
fn compress_file_to_array() {
|
|
// create a file with plain text...
|
|
|
|
// ...compress it to in-memory data
|
|
|
|
// ...confirm that matches predefined data
|
|
}
|
|
|
|
#[test]
|
|
fn compress_file() {
|
|
// create a file with plain text...
|
|
|
|
// ...compress it to a temp file...
|
|
|
|
// ...read the compressed data...
|
|
|
|
// ...verify it matches initial plain text
|
|
}
|
|
|
|
#[test]
|
|
fn decompress_file_to_array() {
|
|
// crate a file with plain text...
|
|
|
|
// ...write the compressed version
|
|
|
|
// ...
|
|
}
|
|
|
|
#[test]
|
|
fn decompress_file() {
|
|
|
|
} |