This commit is contained in:
Mark McCaskey 2019-07-17 15:47:59 -07:00
parent e7e1b8c7d3
commit dc19bf32b9
6 changed files with 28 additions and 7 deletions

View File

@ -33,8 +33,7 @@ macro_rules! assert_wasi_output {
let module = wasmer_runtime_core::compile_with(&wasm_bytes[..], &get_compiler())
.expect("WASM can't be compiled");
let import_object =
generate_import_object(vec![], vec![], $po_dir_args, $mapdir_args);
let import_object = generate_import_object(vec![], vec![], $po_dir_args, $mapdir_args);
let instance = module
.instantiate(&import_object)

View File

@ -5,7 +5,7 @@ fn test_envvar() {
"envvar",
vec![],
vec![],
vec!["DOG=1".to_string(),"CAT=2".to_string(),],
vec!["DOG=1".to_string(), "CAT=2".to_string(),],
"../../wasitests/envvar.out"
);
}

View File

@ -4,7 +4,10 @@ fn test_fseek() {
"../../wasitests/fseek.wasm",
"fseek",
vec![],
vec![(".".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet")),],
vec![(
".".to_string(),
::std::path::PathBuf::from("wasitests/test_fs/hamlet")
),],
vec![],
"../../wasitests/fseek.out"
);

View File

@ -4,7 +4,10 @@ fn test_mapdir() {
"../../wasitests/mapdir.wasm",
"mapdir",
vec![],
vec![(".".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet")),],
vec![(
".".to_string(),
::std::path::PathBuf::from("wasitests/test_fs/hamlet")
),],
vec![],
"../../wasitests/mapdir.out"
);

View File

@ -4,7 +4,10 @@ fn test_readlink() {
"../../wasitests/readlink.wasm",
"readlink",
vec![],
vec![(".".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet")),],
vec![(
".".to_string(),
::std::path::PathBuf::from("wasitests/test_fs/hamlet")
),],
vec![],
"../../wasitests/readlink.out"
);

View File

@ -4,7 +4,20 @@ fn test_wasi_sees_virtual_root() {
"../../wasitests/wasi_sees_virtual_root.wasm",
"wasi_sees_virtual_root",
vec![],
vec![("act1".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet/act1")),("act2".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet/act2")),("act1-again".to_string(), ::std::path::PathBuf::from("wasitests/test_fs/hamlet/act1")),],
vec![
(
"act1".to_string(),
::std::path::PathBuf::from("wasitests/test_fs/hamlet/act1")
),
(
"act2".to_string(),
::std::path::PathBuf::from("wasitests/test_fs/hamlet/act2")
),
(
"act1-again".to_string(),
::std::path::PathBuf::from("wasitests/test_fs/hamlet/act1")
),
],
vec![],
"../../wasitests/wasi_sees_virtual_root.out"
);