diff --git a/modules/codelite/codelite.lua b/modules/codelite/codelite.lua
index 08a01db1..6f3e9313 100755
--- a/modules/codelite/codelite.lua
+++ b/modules/codelite/codelite.lua
@@ -27,10 +27,9 @@
end
function codelite.esc(value)
- local result = value:gsub('"', '\\"')
+ local result = value:gsub('&', '&')
result = result:gsub('<', '<')
result = result:gsub('>', '>')
- result = result:gsub('&', '&')
return result
end
diff --git a/modules/codelite/tests/test_codelite_config.lua b/modules/codelite/tests/test_codelite_config.lua
index b36c151e..46e431d0 100644
--- a/modules/codelite/tests/test_codelite_config.lua
+++ b/modules/codelite/tests/test_codelite_config.lua
@@ -17,6 +17,7 @@
function suite.setup()
p.action.set("codelite")
+ p.escaper(codelite.esc)
p.indent(" ")
wks = test.createWorkspace()
end
@@ -198,6 +199,21 @@ cmd2
]]
end
+ function suite.OnProject_PreBuild_Escaped()
+ prebuildcommands {
+ "touch \"./build/copyright\" && echo OK",
+ "cat \"./lib/copyright\" >> \"./build/copyright\""
+ }
+ prepare()
+ codelite.project.preBuild(prj)
+ test.capture [[
+
+ touch "./build/copyright" && echo OK
+ cat "./lib/copyright" >> "./build/copyright"
+
+ ]]
+ end
+
function suite.OnProject_PostBuild()
postbuildcommands { "cmd0", "cmd1" }
prepare()
@@ -210,6 +226,21 @@ cmd2
]]
end
+ function suite.OnProject_PostBuild_Escaped()
+ postbuildcommands {
+ "touch \"./build/copyright\" && echo OK",
+ "cat \"./lib/copyright\" >> \"./build/copyright\""
+ }
+ prepare()
+ codelite.project.postBuild(prj)
+ test.capture [[
+
+ touch "./build/copyright" && echo OK
+ cat "./lib/copyright" >> "./build/copyright"
+
+ ]]
+ end
+
-- TODO: test custom build
diff --git a/modules/codelite/tests/test_codelite_project.lua b/modules/codelite/tests/test_codelite_project.lua
index ff72ebb5..7dcf6848 100644
--- a/modules/codelite/tests/test_codelite_project.lua
+++ b/modules/codelite/tests/test_codelite_project.lua
@@ -17,6 +17,7 @@
function suite.setup()
p.action.set("codelite")
+ p.escaper(codelite.esc)
p.indent(" ")
wks = test.createWorkspace()
end
diff --git a/modules/codelite/tests/test_codelite_workspace.lua b/modules/codelite/tests/test_codelite_workspace.lua
index f36b8508..19d6fc44 100644
--- a/modules/codelite/tests/test_codelite_workspace.lua
+++ b/modules/codelite/tests/test_codelite_workspace.lua
@@ -18,6 +18,7 @@
function suite.setup()
p.action.set("codelite")
+ p.escaper(codelite.esc)
p.indent(" ")
wks = test.createWorkspace()
end