@@ -8,33 +8,33 @@ local util = require "pallene.util"
8
8
9
9
describe (" Pallene utils" , function ()
10
10
11
- it (" returns error when a file doesn't exist" , function ()
11
+ it (" returns error when a file doesn't exist" , function ()
12
12
local filename = " does_not_exist.pln"
13
13
local ok , err = util .get_file_contents (filename )
14
14
assert .falsy (ok )
15
15
assert .matches (filename , err )
16
- end )
16
+ end )
17
17
18
- it (" writes a file to disk" , function ()
18
+ it (" writes a file to disk" , function ()
19
19
local filename = " a_file.pln"
20
20
local ok = util .set_file_contents (filename , " return {}" )
21
21
assert .truthy (ok )
22
22
os.remove (filename )
23
- end )
23
+ end )
24
24
25
- it (" can extract stdout from commands" , function ()
25
+ it (" can extract stdout from commands" , function ()
26
26
local cmd = [[ lua -e 'io.stdout:write("hello")']]
27
27
local ok , err , stdout , stderr = util .outputs_of_execute (cmd )
28
28
assert (ok , err )
29
29
assert .equals (" hello" , stdout )
30
30
assert .equals (" " , stderr )
31
- end )
31
+ end )
32
32
33
- it (" can extract stderr from commands" , function ()
33
+ it (" can extract stderr from commands" , function ()
34
34
local cmd = [[ lua -e 'io.stderr:write("hello")']]
35
35
local ok , err , stdout , stderr = util .outputs_of_execute (cmd )
36
36
assert (ok , err )
37
37
assert .equals (" " , stdout )
38
38
assert .equals (" hello" , stderr )
39
- end )
39
+ end )
40
40
end )
0 commit comments