Skip to content

Commit

Permalink
temp ls copied fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
fitzgen committed Jul 16, 2018
1 parent ef69f12 commit 526a8cb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/all/readme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path>` OK")
.stdout;
let stdout = String::from_utf8_lossy(&stdout);
println!("{}", stdout);
}

#[test]
fn it_copies_a_readme_default_path() {
let fixture = utils::fixture(".");
Expand All @@ -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());

Expand All @@ -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());

Expand Down

0 comments on commit 526a8cb

Please sign in to comment.