From 32a2c52eec07d2501723c2bfd6fd6f09669b999d Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Wed, 31 Oct 2012 09:57:07 -0700 Subject: [PATCH] fix error for when test isn't build --- test2.moon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test2.moon b/test2.moon index 499837e..fb65cb8 100644 --- a/test2.moon +++ b/test2.moon @@ -43,9 +43,9 @@ benchmark = (fn) -> nil, fn! read_all = (fname) -> - f = io.open(fname, "r") - with f\read "*a" - f\close! + if f = io.open(fname, "r") + with f\read "*a" + f\close! diff_file = (a_fname, b_fname) -> out = io.popen(options.diff.tool .. " ".. a_fname .. " " .. b_fname, "r")\read "*a" @@ -107,7 +107,7 @@ describe "input tests", -> \close! else expected_str = read_all output_fname name - return "Test not built: " .. input_fname(name) unless expected_str + error "Test not built: " .. input_fname(name) unless expected_str string_assert expected_str, code