From 9d09b025ab87f7d15459523764fa909a303f2973 Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Fri, 16 Sep 2016 23:47:49 +0200 Subject: Appveyor testing, take 1 --- example/src/main.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'example/src') diff --git a/example/src/main.rs b/example/src/main.rs index 5ee48f3..30436db 100644 --- a/example/src/main.rs +++ b/example/src/main.rs @@ -10,3 +10,15 @@ fn main() { println!("Found: {}", name); } } + +#[test] +fn test() { + assert_eq!(FILES.get("data/foo").expect("data/foo not present").into_owned(), &[102, 111, 111, 10]); + + let files = FILES.file_names().collect::>(); + assert_eq!(files, vec!["data/inner/boom", "data/foo", "data/empty"]); + + assert_eq!(FILES.get("data/inner/boom").unwrap().into_owned(), &[98, 111, 111, 109, 10]); + assert_eq!(FILES.get("data/foo").unwrap().into_owned(), &[102, 111, 111, 10]); + assert_eq!(FILES.get("data/empty").unwrap().into_owned(), &[]); +} -- cgit v1.2.3