aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/fs_spec.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/fs_spec.lua b/spec/fs_spec.lua
index 3ed22fbe..a9a34a41 100644
--- a/spec/fs_spec.lua
+++ b/spec/fs_spec.lua
@@ -1126,6 +1126,12 @@ describe("Luarocks fs test #unit", function()
1126 create_file(tmpfile, "print(\"foo\")") 1126 create_file(tmpfile, "print(\"foo\")")
1127 assert.truthy(fs.is_lua(tmpfile)) 1127 assert.truthy(fs.is_lua(tmpfile))
1128 end) 1128 end)
1129
1130 it("returns true if the argument is a valid lua script with shebang", function()
1131 tmpfile = get_tmp_path()
1132 create_file(tmpfile, "#!/usr/bin/env lua\n\nprint(\"foo\")")
1133 assert.truthy(fs.is_lua(tmpfile))
1134 end)
1129 1135
1130 it("returns false if the argument is not a valid lua script", function() 1136 it("returns false if the argument is not a valid lua script", function()
1131 tmpfile = os.tmpname() 1137 tmpfile = os.tmpname()