We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b9e1a4 commit 32a2c52Copy full SHA for 32a2c52
test2.moon
@@ -43,9 +43,9 @@ benchmark = (fn) ->
43
nil, fn!
44
45
read_all = (fname) ->
46
- f = io.open(fname, "r")
47
- with f\read "*a"
48
- f\close!
+ if f = io.open(fname, "r")
+ with f\read "*a"
+ f\close!
49
50
diff_file = (a_fname, b_fname) ->
51
out = io.popen(options.diff.tool .. " ".. a_fname .. " " .. b_fname, "r")\read "*a"
@@ -107,7 +107,7 @@ describe "input tests", ->
107
\close!
108
else
109
expected_str = read_all output_fname name
110
- return "Test not built: " .. input_fname(name) unless expected_str
+ error "Test not built: " .. input_fname(name) unless expected_str
111
112
string_assert expected_str, code
113
0 commit comments