Skip to content

Commit

Permalink
avoid Windows shenanigans
Browse files Browse the repository at this point in the history
  • Loading branch information
sokorototo committed May 22, 2024
1 parent d8b6a8f commit b341ab4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vach-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "vach-cli"
version = "0.5.6"
version = "0.6.0"
edition = "2021"
authors = [
"Jasper Fortuin <[email protected]>",
" Newton Toto <[email protected]>",
"Newton Toto <[email protected]>",
]
description = "A command-line tool to work with .vach files"
license = "MIT"
Expand Down
9 changes: 2 additions & 7 deletions vach/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,15 @@ fn fetch_with_signature() -> InternalResult {
config.load_public_key(keypair)?;

let mut archive = Archive::with_config(target, &config)?;
let resource = archive.fetch_mut("test_data/song.txt")?;
let song = str::from_utf8(&resource.data).unwrap();
let resource = archive.fetch_mut("test_data/quicksort.wasm")?;
assert_eq!(resource.data.len(), 106537);

// The adjacent resource was flagged to not be signed
let not_signed_resource = archive.fetch_mut("not_signed")?;
assert!(!not_signed_resource.flags.contains(Flags::SIGNED_FLAG));
assert!(!not_signed_resource.authenticated);

// Check authenticity of retrieved data
let song = song.trim();
assert_eq!(song.len(), 1977);

let resource = archive.fetch_mut("signed")?;

assert!(resource.authenticated);
assert!(resource.flags.contains(Flags::SIGNED_FLAG));

Expand Down

0 comments on commit b341ab4

Please sign in to comment.