diff --git a/tests/all/readme.rs b/tests/all/readme.rs index 4824de4c..6b38befc 100644 --- a/tests/all/readme.rs +++ b/tests/all/readme.rs @@ -6,6 +6,18 @@ use std::fs; use utils; use wasm_pack::readme; +fn ls(path: &str) { + let mut cmd = ::std::process::Command::new("ls"); + cmd.arg("-r").arg(path); + println!("wasm-pack: running: {:?}", cmd); + let stdout = cmd + .output() + .expect("should spawn and run `ls -r ` OK") + .stdout; + let stdout = String::from_utf8_lossy(&stdout); + println!("{}", stdout); +} + #[test] fn it_copies_a_readme_default_path() { let fixture = utils::fixture("."); @@ -18,6 +30,8 @@ fn it_copies_a_readme_default_path() { "wasm-pack: should have copied README.md from '{}' to '{}'", crate_readme_path, pkg_readme_path ); + ls(&fixture.path); + assert!(fs::metadata(&crate_readme_path).is_ok()); assert!(fs::metadata(&pkg_readme_path).is_ok()); @@ -38,6 +52,8 @@ fn it_creates_a_package_json_provided_path() { "wasm-pack: should have copied README.md from '{}' to '{}'", crate_readme_path, pkg_readme_path ); + ls(&fixture.path); + assert!(fs::metadata(&crate_readme_path).is_ok()); assert!(fs::metadata(&pkg_readme_path).is_ok());