From a403207a5b528692ea012381921174969538e56d Mon Sep 17 00:00:00 2001 From: Moses Miller Date: Mon, 18 Dec 2017 16:13:33 -0800 Subject: [PATCH] Update rust version to 1.22.1 --- README.md | 2 +- docker/rust.docker | 2 +- lib/runners/rust.js | 2 +- test/runners/rust_spec.js | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 095b7c9d..80e9132e 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Many languages are currently supported in various states of completeness. This l | R | 3.4.1 | ✓ | | testthat | | | r-runner | | | | Racket | | ✓ | | | Kumite Only | | func-runner | | | | Ruby | 2.3.0 | ✓ | ✓ | cw-2, rspec | cw-2 | cw-2, rspec | ruby-runner | cw-2 | | -| Rust | 1.15.1 | ✓ | | rust | rust | | | | | +| Rust | 1.22.1 | ✓ | | rust | rust | | | | | | Scala | 2.12.3 | ✓ | | junit4,scalatest | | | gradle-runner | | | | Scss/Sass | | ??? | | ??? | | | | | | | SQL | SQLite3 | ✓ | ✓ | rspec | | | | | | diff --git a/docker/rust.docker b/docker/rust.docker index 873944b9..74c0ed3e 100644 --- a/docker/rust.docker +++ b/docker/rust.docker @@ -4,7 +4,7 @@ FROM codewars/base-runner ENV RUSTUP_HOME=/usr/local/rustup \ CARGO_HOME=/usr/local/cargo \ PATH=/usr/local/cargo/bin:$PATH -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --default-toolchain 1.15.1; \ +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --default-toolchain 1.22.1; \ chmod -R a+w $RUSTUP_HOME $CARGO_HOME; RUN ln -s /home/codewarrior /workspace diff --git a/lib/runners/rust.js b/lib/runners/rust.js index f581c6bb..f8c3d609 100644 --- a/lib/runners/rust.js +++ b/lib/runners/rust.js @@ -59,7 +59,7 @@ module.exports = { const name = m[1]; const fail = []; const x = ss[++i]; - const m2 = x.match(/thread '[^']+' panicked at '(.+)'.*/); + const m2 = x.match(/thread '[^']+' panicked at '([^]+)'.*/); if (m2.index != 1) fail.push(x.slice(1, m2.index)); // user logged output fail.push(`Test Failed<:LF:>${m2[1].replace(/\\'/g, "'")}`); failures[name] = fail; diff --git a/test/runners/rust_spec.js b/test/runners/rust_spec.js index 76f88c60..e242e50e 100644 --- a/test/runners/rust_spec.js +++ b/test/runners/rust_spec.js @@ -312,9 +312,9 @@ describe('rust runner', function() { }, function(buffer) { expect(buffer.stdout).to.contain(`returns_sum1_1`); expect(buffer.stdout).to.contain(`\nTest Passed`); - expect(buffer.stdout).to.contain(`\nTest Failed<:LF:>assertion failed: \`(left == right)\` (left: \`"abc\\\\'"\`, right: \`"'\\\\cba"\`)`); - expect(buffer.stdout).to.contain(`\nTest Failed<:LF:>assertion failed: \`(left == right)\` (left: \`"abc'"\`, right: \`"'cba"\`)`); - expect(buffer.stdout).to.contain(`\nTest Failed<:LF:>assertion failed: \`(left == right)\` (left: \`1\`, right: \`2\`)`); + expect(buffer.stdout).to.contain(`\nTest Failed<:LF:>assertion failed: \`(left == right)\`\n left: \`"abc\\\\'"\`,\n right: \`"'\\\\cba"\``); + expect(buffer.stdout).to.contain(`\nTest Failed<:LF:>assertion failed: \`(left == right)\`\n left: \`"abc'"\`,\n right: \`"'cba"\``); + expect(buffer.stdout).to.contain(`\nTest Failed<:LF:>assertion failed: \`(left == right)\`\n left: \`1\`,\n right: \`2\``); done(); }); });