Fix sending detection
This commit is contained in:
@ -107,12 +107,12 @@ fn main()
|
||||
{
|
||||
let f = f.unwrap();
|
||||
let file_content = fs::read_to_string(f.path()).unwrap();
|
||||
println!("========NOW TESTING '{:?}'========", f.path());
|
||||
println!("========NOW TESTING {:?}========", f.path());
|
||||
match compile(&file_content, &intrinsics, interpret, debug)
|
||||
{
|
||||
Ok(maybe_msg) =>
|
||||
{
|
||||
println!("---Successfully parsed '{:?}'---", f.path());
|
||||
println!("---Successfully parsed {:?}---", f.path());
|
||||
if let Some(msg) = &maybe_msg
|
||||
{
|
||||
print!("---Output---\n'{}'\n", msg);
|
||||
@ -141,14 +141,14 @@ fn main()
|
||||
println!("===PASSED===");
|
||||
count += 1;
|
||||
}
|
||||
else if let Some(index) = file_content.find(":END:")
|
||||
else if let Some(index) = file_content.find("//:END:")
|
||||
{
|
||||
let expected_output = file_content[10..index].replace("\n//", "\n");
|
||||
println!("\n\n===FAILED===\nExpected the output to be {}", expected_output);
|
||||
}
|
||||
else
|
||||
{
|
||||
panic!("Could not find an ending marker (//:END:) for the expected output in {:?}", f.file_name());
|
||||
panic!("Could not find an ending marker (:END:) for the expected output in {:?}", f.file_name());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user