update tests

Some PRs were landed in the meantime
This commit is contained in:
steveklabnik 2017-04-14 15:27:57 -04:00
parent d319d8f642
commit 8947fa348a
1 changed files with 13 additions and 1 deletions

View File

@ -208,6 +208,18 @@ function run_rust_code(code_block) {
result_block = code_block.find(".result"); result_block = code_block.find(".result");
} }
let text = code_block.find(".language-rust").text();
let params = {
version: "stable",
optimize: "0",
code: text,
};
if(text.includes("#![feature")) {
params.version = "nightly";
}
result_block.text("Running..."); result_block.text("Running...");
$.ajax({ $.ajax({
@ -216,7 +228,7 @@ function run_rust_code(code_block) {
crossDomain: true, crossDomain: true,
dataType: "json", dataType: "json",
contentType: "application/json", contentType: "application/json",
data: JSON.stringify({version: "stable", optimize: "0", code: code_block.find(".language-rust").text() }), data: JSON.stringify(params),
success: function(response){ success: function(response){
result_block.text(response.result); result_block.text(response.result);
} }