diff options
author | Till Höppner | 2016-09-16 23:47:49 +0200 |
---|---|---|
committer | Till Höppner | 2016-09-17 00:09:59 +0200 |
commit | 9d09b025ab87f7d15459523764fa909a303f2973 (patch) | |
tree | f5f2b04c20bf36faa6d3e90bcfa5e21e8d8b8494 /example/src/main.rs | |
parent | b71188c952f0f4665d359a63c1d716d00fe752ab (diff) | |
download | includedir-9d09b025ab87f7d15459523764fa909a303f2973.tar.gz includedir-9d09b025ab87f7d15459523764fa909a303f2973.tar.xz includedir-9d09b025ab87f7d15459523764fa909a303f2973.zip |
Appveyor testing, take 1
Diffstat (limited to 'example/src/main.rs')
-rw-r--r-- | example/src/main.rs | 12 |
1 files changed, 12 insertions, 0 deletions
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::<Vec<_>>(); + 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(), &[]); +} |