From 65fc8228f17e75b87b3bc9bcdb7d363d7a06f40c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 27 Sep 2018 12:17:04 -0700 Subject: [PATCH 1/2] Remove a stray script --- crates/test/out.sh | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 crates/test/out.sh diff --git a/crates/test/out.sh b/crates/test/out.sh deleted file mode 100644 index 6c38aa773..000000000 --- a/crates/test/out.sh +++ /dev/null @@ -1,29 +0,0 @@ -rustc \ - +nightly \ - --crate-name \ - wasm_bindgen_test_runner \ - crates/test-runner/src/main.rs \ - --crate-type \ - bin \ - --emit=dep-info,link \ - -C \ - opt-level=s \ - -C \ - panic=abort \ - -C \ - lto \ - -C \ - metadata=de5c24b259631256 \ - -C \ - extra-filename=-de5c24b259631256 \ - --out-dir \ - /home/alex/code/wasm-bindgen/target/release/deps \ - -L \ - dependency=/home/alex/code/wasm-bindgen/target/release/deps \ - --extern \ - failure=/home/alex/code/wasm-bindgen/target/release/deps/libfailure-7c7642ad9a5ea78f.rlib \ - --extern \ - wasm_bindgen_cli_support=/home/alex/code/wasm-bindgen/target/release/deps/libwasm_bindgen_cli_support-319f8cb472c7d7e6.rlib \ - -L \ - native=/home/alex/code/wasm-bindgen/target/release/build/backtrace-sys-219bc8940e273b6b/out \ - -Z time-passes From fd1a00db76a77b827246fad838d1bba3a214935f Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 27 Sep 2018 12:20:18 -0700 Subject: [PATCH 2/2] Escape HTML text in browser failure messages When browser tests fail we're appending to `innerHTML`, which means that we need to escape some characters for all to show up! Closes #898 --- crates/test/src/rt/browser.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/test/src/rt/browser.rs b/crates/test/src/rt/browser.rs index fc97d5adb..a3beecee0 100644 --- a/crates/test/src/rt/browser.rs +++ b/crates/test/src/rt/browser.rs @@ -45,7 +45,14 @@ impl Browser { impl super::Formatter for Browser { fn writeln(&self, line: &str) { let mut html = self.pre.inner_html(); - html.push_str(&line); + for c in line.chars() { + match c { + '<' => html.push_str("<"), + '>' => html.push_str(">"), + '&' => html.push_str("&"), + c => html.push(c), + } + } html.push_str("\n"); self.pre.set_inner_html(&html); }