Commit 437180c9 authored by Jeff Smits's avatar Jeff Smits

Have tests accept exit code 0 as valid output of test

parent 5084265f
......@@ -306,10 +306,15 @@ fn {}() {{
let program = io::read_aterm(&f, &"{}");
assert!(program.is_ok());
let term = interpret_main(&f, program.unwrap(), libraries.unwrap());
assert!(term.is_ok());
let mut result = String::new();
assert!(term.unwrap().to_ascii(&mut result).is_ok());
result
match term {{
Ok(term) => {{
let mut result = String::new();
assert!(term.to_ascii(&mut result).is_ok());
result
}}
Err(TracedError(Error::InterpreterExit(0),_)) => String::new(),
_ => {{ assert!(false, "Result not Ok or Exit(0)"); String::new() }},
}}
}});
assert!(handler.is_ok());
let result = handler.unwrap().join();
......
......@@ -2,9 +2,9 @@ extern crate strs;
extern crate aterm;
use strs::io;
use strs::error::Result;
use strs::error::{Error, Result};
use strs::factory::ATermFactory;
use strs::interpreter::interpret_main;
use strs::interpreter::{TracedError, interpret_main};
use aterm::print::ATermWrite;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment