Skip to content

Commit ce333e7

Browse files
committed
---
yaml --- r: 61275 b: refs/heads/try c: 9af04f3 h: refs/heads/master i: 61273: a2cce53 61271: d030684 v: v3
1 parent be6326b commit ce333e7

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2d28d645422c1617be58c8ca7ad9a457264ca850
5-
refs/heads/try: 4a9d8ff1a7ee6e832cceb582cb213ac6444f09b6
5+
refs/heads/try: 9af04f3e77b201d9a33ebfaeaf622aa44e782d71
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librusti/rusti.rc

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -437,21 +437,13 @@ mod tests {
437437
}
438438
}
439439

440-
fn super_simple() {
440+
fn run_cmds(cmds: &[&str]) {
441441
let mut r = repl();
442-
let result = run_line(&mut r, io::stdin(), io::stdout(), ~"", false);
443-
result.expect("empty input shouldn't fail in rusti");
444-
}
445-
446-
fn use_does_not_crash() {
447-
// Regression tests for #5937
448-
let mut r = repl();
449-
let result = run_line(&mut r, io::stdin(), io::stdout(),
450-
~"use core::util::with;", false);
451-
r = result.expect("use statements should't fail in rusti");
452-
let result = run_line(&mut r, io::stdin(), io::stdout(),
453-
~"", false);
454-
result.expect("something should be able to happen after a use statement");
442+
for cmds.each |&cmd| {
443+
let result = run_line(&mut r, io::stdin(), io::stdout(),
444+
cmd.to_owned(), false);
445+
r = result.expect(fmt!("the command '%s' failed", cmd));
446+
}
455447
}
456448

457449
#[test]
@@ -464,8 +456,17 @@ mod tests {
464456
//
465457
// To get some interesting output, run with RUST_LOG=rusti::tests
466458

467-
debug!("super_simple"); super_simple();
468-
debug!("use_does_not_crash"); use_does_not_crash();
459+
debug!("hopefully this runs");
460+
run_cmds([""]);
461+
462+
debug!("regression test for #5937");
463+
run_cmds(["use core;", ""]);
464+
465+
debug!("regression test for #5784");
466+
run_cmds(["let a = 1;"]);
469467

468+
debug!("regression test for #5803");
469+
run_cmds(["spawn( || println(\"Please don't segfault\") );",
470+
"do spawn { println(\"Please?\"); }"]);
470471
}
471472
}

0 commit comments

Comments
 (0)