aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2020-02-05 15:18:14 +0100
committerHisham Muhammad <hisham@gobolinux.org>2020-02-05 16:48:21 +0100
commit201ac63c7692355b07b83034c1813c000ec70e84 (patch)
treee921ad9933609075768f2b97e6935c62ca39a254 /spec
parent7c70a3208dcab7a9e568ede2a30b870ce0d96a20 (diff)
downloadluarocks-201ac63c7692355b07b83034c1813c000ec70e84.tar.gz
luarocks-201ac63c7692355b07b83034c1813c000ec70e84.tar.bz2
luarocks-201ac63c7692355b07b83034c1813c000ec70e84.zip
fs.lua: fix error message when source file is missing
Fixes #1147.
Diffstat (limited to 'spec')
-rw-r--r--spec/fs_spec.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/fs_spec.lua b/spec/fs_spec.lua
index 5d8926c4..16295869 100644
--- a/spec/fs_spec.lua
+++ b/spec/fs_spec.lua
@@ -894,7 +894,9 @@ describe("Luarocks fs test #unit", function()
894 it("returns false and does nothing if the source file does not exist", function() 894 it("returns false and does nothing if the source file does not exist", function()
895 srcfile = get_tmp_path() 895 srcfile = get_tmp_path()
896 dstfile = get_tmp_path() 896 dstfile = get_tmp_path()
897 assert.falsy(fs.copy(srcfile, dstfile, nil)) 897 local ok, err = fs.copy(srcfile, dstfile, nil)
898 assert.falsy(ok)
899 assert.not_match("are the same file", err)
898 assert.falsy(exists_file(dstfile)) 900 assert.falsy(exists_file(dstfile))
899 end) 901 end)
900 902