fn newsched_log_str(msg: ~str) {
use rt::task::Task;
use rt::local::Local;
+ use str::StrSlice;
+ use container::Container;
+
+ // Truncate the string
+ let buf_bytes = 2048;
+ let msg = if msg.len() > buf_bytes {
+ msg.slice(0, buf_bytes) + "[...]"
+ } else {
+ msg
+ };
unsafe {
match Local::try_unsafe_borrow::<Task>() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// error-pattern:task failed at 'assertion failed: false'
+// error-pattern:failed at 'assertion failed: false'
fn main() {
assert!(false);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// error-pattern:task failed at 'test-assert-fmt 42 rust'
+// error-pattern:failed at 'test-assert-fmt 42 rust'
fn main() {
assert!(false, "test-assert-fmt %d %s", 42, "rust");
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// error-pattern:task failed at 'test-assert-owned'
+// error-pattern:failed at 'test-assert-owned'
fn main() {
assert!(false, ~"test-assert-owned");
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// error-pattern:task failed at 'test-assert-static'
+// error-pattern:failed at 'test-assert-static'
fn main() {
assert!(false, "test-assert-static");
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// error-pattern:task failed at 'explicit failure'
+// error-pattern:failed at 'explicit failure'
fn main() {
fail!();
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// error-pattern:task failed at 'test-fail-fmt 42 rust'
+// error-pattern:failed at 'test-fail-fmt 42 rust'
fn main() {
fail!("test-fail-fmt %d %s", 42, "rust");
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// error-pattern:task failed at 'test-fail-owned'
+// error-pattern:failed at 'test-fail-owned'
fn main() {
fail!("test-fail-owned");
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// error-pattern:task failed at 'test-fail-static'
+// error-pattern:failed at 'test-fail-static'
fn main() {
fail!("test-fail-static");